Package org.jboss.kernel.plugins.deployment

Examples of org.jboss.kernel.plugins.deployment.AbstractKernelDeployer


         else
         {
            deployment = load(binFile);
         }

         AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
         deployer.deploy(deployment);
      }
      catch (Throwable throwable)
      {
         throw new RuntimeException("Unable to bootstrap: ", throwable);
      }
View Full Code Here


      return bootstrap1.getKernel();
   }

   protected static void deploy(KernelDeployment deployment) throws Throwable
   {
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(createKernel());
      deployer.deploy(deployment);
      deployer.validate();

   }
View Full Code Here

   }
  
   protected void createService() throws Exception
   {
      Kernel kernel = getKernel();
      deployer = new AbstractKernelDeployer(kernel, ControllerState.CREATE, ControllerMode.MANUAL);
      try
      {
         deployer.deploy(deployment);
      }
      catch (Throwable t)
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setBeanFactories(Arrays.asList(demandBean, supplyBean));

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);

      deployer.deploy(deployment);
      try
      {
         Object db = controller.getInstalledContext("DemandBean").getTarget();
         assertNotNull(db);
         Object sb = controller.getInstalledContext("SupplyBean").getTarget();
         assertNotNull(sb);
      }
      finally
      {
         deployer.undeploy(deployment);
      }
   }
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setBeanFactories(Arrays.asList(demandBean, supplyBean));

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);

      deployer.deploy(deployment);
      try
      {
         Object db = controller.getInstalledContext("DemandBean").getTarget();
         assertNotNull(db);
         Object sb = controller.getInstalledContext("SupplyBean").getTarget();
         assertNotNull(sb);
      }
      finally
      {
         deployer.undeploy(deployment);
      }
   }
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setBeanFactories(Arrays.asList(dependOnBean, resolverBean));

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);

      deployer.deploy(deployment);
      try
      {
         Object db = controller.getInstalledContext("DependOnBean").getTarget();
         assertNotNull(db);
         Object rb = controller.getInstalledContext("DependencyResolver").getTarget();
         assertNotNull(rb);
      }
      finally
      {
         deployer.undeploy(deployment);
      }
   }
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setBeanFactories(Arrays.asList(builder.getBeanMetaDataFactory()));

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);

      deployer.deploy(deployment);
      try
      {
         Object o = controller.getInstalledContext("CollectionBean").getTarget();
         assertNotNull(o);
         assertInstanceOf(o, SimpleBean.class);
         SimpleBean bean = (SimpleBean)o;

         Object[] arr = bean.getArray();
         assertEquals(2, arr.length);
         assertEquals(5, arr[0]);
         assertEquals(10, arr[1]);

         List<?> lst = bean.getList();
         assertEquals(2, lst.size());
         assertEquals("One", lst.get(0));
         assertEquals("Two", lst.get(1));

         Set<?> st = bean.getSet();
         assertEquals(2, lst.size());
         assertTrue(st.contains("En"));
         assertTrue(st.contains("To"));

         Collection<?> coll = bean.getCollection();
         assertEquals(2, lst.size());
         assertTrue(coll.contains("Eins"));
         assertTrue(coll.contains("Zwei"));

         Map<?, ?> mp = bean.getMap();
         assertEquals(2, mp.size());
         assertEquals("Uno", mp.get("One"));
         assertEquals("Dos", mp.get("Two"));
      }
      finally
      {
         deployer.undeploy(deployment);
      }
   }
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setBeanFactories(Arrays.asList(builder.getBeanMetaDataFactory()));

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);

      deployer.deploy(deployment);
      try
      {
         Object o = controller.getInstalledContext("ReplaceBean").getTarget();
         assertNotNull(o);
         assertInstanceOf(o, SimpleBean.class);
         SimpleBean bean = (SimpleBean)o;

         Integer integer = bean.getAnInt();
         assertEquals(new Integer(5), integer);

         String string = bean.getAString();
         assertEquals("Two", string);

         Object obj = bean.getAnObject();
         assertEquals("Four", obj);

         Object[] arr = bean.getArray();
         assertEquals(2, arr.length);
         assertEquals(5, arr[0]);
         assertEquals(10, arr[1]);

         Map<?, ?> mp = bean.getMap();
         assertEquals(2, mp.size());
         assertEquals("Uno", mp.get("One"));
         assertEquals("Dos", mp.get("Two"));
      }
      finally
      {
         deployer.undeploy(deployment);
      }
   }
View Full Code Here

         else
         {
            deployment = load(binFile);
         }

         AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
         deployer.deploy(deployment);
      }
      catch (Throwable throwable)
      {
         throw new RuntimeException("Unable to bootstrap: ", throwable);
      }
View Full Code Here

TOP

Related Classes of org.jboss.kernel.plugins.deployment.AbstractKernelDeployer

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.