Examples of ContextImpl


Examples of org.jboss.forge.classloader.mock.sidewaysproxy.ContextImpl

      Action action1 = getProxiedInstance(A, B, typeAction1);

      Class<?> typePayload1 = C.loadClass(Payload1.class.getName());
      Payload payload1 = getProxiedInstance(A, C, typePayload1);

      Context context = new ContextImpl();
      ContextValue<Payload> value = new ContextValueImpl<Payload>();
      value.set(payload1);
      context.set(value);

      action1.handle(context);
   }
View Full Code Here

Examples of org.onebusaway.webapp.gwt.common.context.ContextImpl

      }
    });

    _dialog.show();

    Context context = new ContextImpl();

    if (!_stopsById.isEmpty()) {
      CoordinateBounds b = new CoordinateBounds();
      for (StopBean stop : _stopsById.values())
        b.addPoint(stop.getLat(), stop.getLon());
View Full Code Here

Examples of org.opoo.press.impl.ContextImpl

    site = new File(siteDir);
    if(!site.exists() || !site.isDirectory()){
      throw new IllegalArgumentException("Site is not a valid directory.");
    }
   
    new ContextImpl().initialize();
    siteManager = Application.getContext().getSiteManager();
    sourceParser = Application.getContext().getSourceParser();
  }
View Full Code Here

Examples of org.ow2.easybeans.naming.context.ContextImpl

            if (this.warService == null) {
                logger.warn("There are WAR files in the EAR ''{0}'' but the 'web' service is not available", earDeployable);
            } else {

                // Build context for sending parameters
                Context ctx = new ContextImpl(earURL.toExternalForm());
                try {
                    ctx.rebind("earURL", earURL);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }
                // Get URLS of the wars and context-root
                List<URL> urls = new LinkedList<URL>();
                List<String> ctxRoots = new LinkedList<String>();
                for (WARDeployable warDeployable : wars) {

                    // URL
                    URL url = null;
                    try {
                        url = warDeployable.getArchive().getURL();
                    } catch (ArchiveException e) {
                        throw new DeployerException("Cannot get the URL for the archive '" + warDeployable.getArchive() + "'",
                                e);
                    }
                    urls.add(url);

                    // Context-root
                    ctxRoots.add(warDeployable.getContextRoot());

                }
                try {
                    ctx.rebind("urls", urls.toArray(new URL[urls.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the urls parameter '" + urls + "'", e);
                }

                // Bind the parent classloader of the web application
                try {
                    ctx.rebind("parentClassLoader", parentClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the parentClassLoader parameter '" + parentClassLoader + "'", e);
                }

                // Bind the earClassLoader of the web application
                try {
                    ctx.rebind("earClassLoader", earClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the earClassLoader parameter '" + earClassLoader + "'", e);
                }

                // No alt-dd yet, give an empty array
                try {
                    ctx.rebind("altDDs", new URL[urls.size()]);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the altDDs parameter.'", e);
                }

                // Build context roots
                try {
                    ctx.rebind("contextRoots", ctxRoots.toArray(new String[ctxRoots.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the contextRoots parameter '" + urls + "'", e);
                }

                try {
View Full Code Here

Examples of org.ow2.easybeans.naming.context.ContextImpl

        List<RARDeployable> rars = earDeployable.getRARDeployables();
        if (rars.size() > 0) {
            if (this.rarService == null) {
                logger.warn("There are RAR files in the EAR ''{0}'' but the resource service is not available", earDeployable);
            } else {
                Context ctx = new ContextImpl(earURL.toExternalForm());
                try {
                    ctx.rebind("earUrl", earURL);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }
                List<URL> urls = new ArrayList<URL>();
                for (RARDeployable rarDeployable : rars) {
                    try {
                        urls.add(rarDeployable.getArchive().getURL());
                    } catch (ArchiveException e) {
                        throw new DeployerException("Cannot get the URL for the archive '" + rarDeployable.getArchive() + "'",
                                e);
                    }
                }
                try {
                    ctx.rebind("urls", urls.toArray(new URL[urls.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the urls parameter '" + urls + "'", e);
                }
                try {
                    ctx.rebind("earClassLoader", earClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the earClassLoader parameter '" + earClassLoader + "'", e);
                }
                try {
                    ctx.rebind("altDDs", new URL[urls.size()]);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the altDDs parameter.'", e);
                }

                try {
View Full Code Here

Examples of org.ow2.easybeans.naming.context.ContextImpl

                    }
                }


                // Deploy EJB 2.1 on JOnAS service
                Context ctx = new ContextImpl(earURL.toExternalForm());
                try {
                    ctx.rebind("earUrl", earURL);
                    ctx.rebind("earRootUrl", earURL);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }

                try {
                    ctx.rebind("jarURLs", urls.toArray(new URL[urls.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the urls parameter '" + urls + "'", e);
                }
                try {
                    ctx.rebind("earClassLoader", earClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the earClassLoader parameter '" + earClassLoader + "'", e);
                }

                // Bind the EJB classloader
                try {
                    ctx.rebind("ejbClassLoader", ejbClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the ejbClassLoader parameter '" + ejbClassLoader + "'", e);
                }

                // Role names
                try {
                    ctx.rebind("roleNames", new String[0]);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the altDDs parameter.'", e);
                }

                try {
View Full Code Here

Examples of org.ow2.easybeans.naming.context.ContextImpl

     * @throws NamingException if the creation of the java: context failed.
     */
    public Context createEnvironmentContext(final String namespace) throws NamingException {

        // Create a new environment
        ContextImpl ctx = new ContextImpl(namespace, true, null);

        // Create subContext
        Context compCtx = (Context) ctx.lookup("comp");

        // Bind java:comp/UserTransaction
        if (this.userTransaction == null) {
            try {
                this.userTransaction = (UserTransaction) this.ictx.lookup("javax.transaction.UserTransaction");
View Full Code Here

Examples of org.syrup.helpers.ContextImpl

        // [TODO: check if it is necessary to read it again, or can we take the
        // given parameter p?]
        PTask self = readPTask(p.key(), con);

        return new ContextImpl(self, in_1, in_2, out_1, out_2);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.