Package org.jboss.kernel.spi.deployment

Examples of org.jboss.kernel.spi.deployment.KernelDeployment


   {
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      long start = System.currentTimeMillis();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
      long end = System.currentTimeMillis() - start;
      System.out.println("XML parsing took: " + end);
      return deployment;
   }
View Full Code Here


   }

   protected void parseMetaData(DeploymentInfo di, URL url) throws DeploymentException
   {
      super.parseMetaData(di, url);
      KernelDeployment deployment = (KernelDeployment) di.metaData;
      deployment.setName(url.toString());
   }
View Full Code Here

   protected KernelDeployment deployMC(URL url) throws Exception
   {
      try
      {
         log.debug("Deploying " + url);
         KernelDeployment deployment = beanDeployer.deploy(url);
         log.trace("Deployed " + url);
         return deployment;
      }
      catch (RuntimeException e)
      {
View Full Code Here

   }
  
   public void testUpdateComponent() throws Throwable
   {
      // Install
      KernelDeployment deployment = createKernelDeployment(BEAN_NAMES);
      // install
      installDeployment(deployment);
     
      // Create the managed objects
      ManagedObject deploymentMO = getMOF().initManagedObject(deployment, null);
View Full Code Here

   public void test() throws Throwable
   {
      // Set the jboss.bind.address
      System.setProperty("jboss.bind.address", "127.0.0.1");
      // Parse
      KernelDeployment deployment = parse(Thread.currentThread().getContextClassLoader().getResource("profileservice/persistence/testbindings-jboss-beans.xml").toString());
      // Deploy
      deploy(deployment);
      // Get the BeanMetaData
      KernelControllerContext ctx = (KernelControllerContext) controller.getContext("ServiceBindingManagementObject", null);
      assertNotNull(ctx);
View Full Code Here

  
  
   protected KernelDeployment parse(String name) throws Throwable
   {
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(name, resolver);
      deployment.setName(name);
      return deployment;
   }
View Full Code Here

   public void testDeploy() throws Throwable
   {
      HornetQBootstrapServer bootstrap = new HornetQBootstrapServer(new String[] {});
      bootstrap.run();
      Assert.assertFalse(DummyBean.started);
      KernelDeployment kernelDeployment = bootstrap.deploy(HornetQBootstrapServerTest.beans1);
      Assert.assertTrue(DummyBean.started);
      bootstrap.undeploy(kernelDeployment);
      Assert.assertFalse(DummyBean.started);
      bootstrap.shutDown();
   }
View Full Code Here

   public void testDeployXml() throws Throwable
   {
      HornetQBootstrapServer bootstrap = new HornetQBootstrapServer(new String[] {});
      bootstrap.run();
      Assert.assertFalse(DummyBean.started);
      KernelDeployment kernelDeployment = bootstrap.deploy("test", HornetQBootstrapServerTest.xml);
      Assert.assertTrue(DummyBean.started);
      bootstrap.undeploy(kernelDeployment);
      Assert.assertFalse(DummyBean.started);
      bootstrap.shutDown();
   }
View Full Code Here

   protected KernelDeployment deploy(URL url) throws Exception
   {
      try
      {
         log.debug("Deploying " + url);
         KernelDeployment deployment = deployer.deploy(url);
         log.trace("Deployed " + url);
         return deployment;
      }
      catch (RuntimeException e)
      {
View Full Code Here

    */
   public void undeploy(final String name)
   {
      if (name == null)
         throw new IllegalArgumentException("Null name");
      KernelDeployment deployment = deploymentsByName.remove(name);
      if (deployment == null)
         throw new IllegalStateException("Unknown deployment " + name);
      undeploy(deployment);
   }
View Full Code Here

TOP

Related Classes of org.jboss.kernel.spi.deployment.KernelDeployment

Copyright © 2018 www.massapicom. 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.