Examples of DeploymentFactory


Examples of javax.enterprise.deploy.spi.factories.DeploymentFactory

            className = jar.getManifest().getMainAttributes().getValue("J2EE-DeploymentFactory-Implementation-Class");
            if(className == null) {
                throw new DeploymentException("The driver JAR "+file.getAbsolutePath()+" does not specify a J2EE-DeploymentFactory-Implementation-Class; cannot load driver.");
            }
            jar.close();
            DeploymentFactory factory = (DeploymentFactory) Class.forName(className).newInstance();
            mgr.registerDeploymentFactory(factory);
        } catch(DeploymentException e) {
            throw e;
        } catch(Exception e) {
            throw new DeploymentSyntaxException("Unable to load driver class "+className+" from JAR "+file.getAbsolutePath(), e);
View Full Code Here

Examples of javax.enterprise.deploy.spi.factories.DeploymentFactory

        WebDeployable webDeployable = new WebDeployable(WarUrl);
        DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];

        Kernel kernel = PortletManager.getKernel();
        DeploymentFactory factory = new DeploymentFactoryWithKernel(kernel);
        DeploymentManager deploymentManager = factory.getDeploymentManager("deployer:geronimo:inVM", null, null);
        DeploymentConfiguration deploymentConfiguration = deploymentManager.createConfiguration(webDeployable);
        WebAppDConfigRoot configRoot = (WebAppDConfigRoot) deploymentConfiguration.getDConfigBeanRoot(ddBeanRoot);
        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);

        webApp.setContextRoot(data.getContextRoot());
View Full Code Here

Examples of javax.enterprise.deploy.spi.factories.DeploymentFactory

    System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
    DeploymentManager dm = (DeploymentManager) connections.get(server.getId());

    if (dm == null) {
      DeploymentFactory factory = getGeronimoServer(server).getDeploymentFactory();
      String deployerURL = getGeronimoServer(server).getDeployerURL();
      Trace.trace(Trace.INFO, "DeployerURL: " + deployerURL);
      String user = getGeronimoServer(server).getAdminID();
      String pw = getGeronimoServer(server).getAdminPassword();
      dm = factory.getDeploymentManager(deployerURL, user, pw);
      connections.put(server.getId(), dm);
    }
   
    getGeronimoServer(server).configureDeploymentManager(dm);
   
View Full Code Here

Examples of javax.enterprise.deploy.spi.factories.DeploymentFactory

    }

    public void testRegisterDeploymentFactory() {
        int initialNumberOfFactories = factoryManager.getDeploymentFactories().length;

        DeploymentFactory factory = new MockDeploymentFactory();
        factoryManager.registerDeploymentFactory(factory);

        int expectedNumberOfFactories = initialNumberOfFactories + 1;
        int currentNumberOfFactories = factoryManager.getDeploymentFactories().length;
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      Deployment deployment = createDeployment();
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);

      DeploymentFactory factory = getDeploymentFactory();
      factory.addContext(deployment, "");
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);
      attachments.addAttachment("test", "hello");

      DeploymentFactory factory = getDeploymentFactory();
      factory.addContext(deployment, "");
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      checkDeployment(context, deployment);
   }

   protected Deployment createOneChild() throws Exception
   {
      DeploymentFactory factory = getDeploymentFactory();
      Deployment deployment = createDeployment(factory);
      factory.addContext(deployment, "child1");
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      checkDeployment(context, deployment);
   }

   protected Deployment createManyChildren() throws Exception
   {
      DeploymentFactory factory = getDeploymentFactory();
      Deployment deployment = createDeployment(factory);
      factory.addContext(deployment, "child1");
      factory.addContext(deployment, "child2");
      factory.addContext(deployment, "child3");
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      checkDeployment(context, deployment);
   }

   protected Deployment createMetaDataLocation() throws Exception
   {
      DeploymentFactory factory = getDeploymentFactory();
      Deployment deployment = createDeployment();
      factory.addContext(deployment, "", ContextInfo.DEFAULT_METADATA_PATH, DeploymentFactory.createClassPath(""));
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.client.spi.DeploymentFactory

      checkDeployment(context, deployment);
   }

   protected Deployment createClasspathEntries() throws Exception
   {
      DeploymentFactory factory = getDeploymentFactory();
      Deployment deployment = createDeployment();
      ContextInfo contextInfo = factory.addContext(deployment, "");
      contextInfo.addClassPathEntry(DeploymentFactory.createClassPathEntry("cp1.txt"));
      contextInfo.addClassPathEntry(DeploymentFactory.createClassPathEntry("cp2.txt"));
      return deployment;
   }
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.