Package org.jboss

Examples of org.jboss.Main


      assertNotNull("jbosstest.deploy.dir != null", deployDirProp);
      // Set the deploy prefix
     

      String[] args = {"-c", "defaulthotdeploy", "-Djboss.server.deployerBeansPrefix="+deployPrefix};
      Main main = new Main();
      main.boot(args);
      Server server = main.getServer();
      assertTrue("Server", server instanceof ServerImpl);
      ServerImpl serverImpl = (ServerImpl) server;

      // Validate that the expected deployment beans exist
      Kernel kernel = serverImpl.getKernel();
      assertInstalled(kernel, "ProfileService");
      assertInstalled(kernel, "MainDeployer");
      assertInstalled(kernel, "BeanDeployer");
      assertInstalled(kernel, "VFSDeploymentScanner");
      KernelRegistry registry = kernel.getRegistry();
      KernelRegistryEntry entry = registry.getEntry("VFSDeploymentScanner");
      /** TODO DeploymentScanner scanner = (DeploymentScanner) entry.getTarget();
      synchronized( scanner )
      {
         while( scanner.getScanCount() <= 0 )
            scanner.wait(10000);
      }
      log.info("Notified of scan: "+scanner.getScanCount());
      */

      // Expected hot deployments
      assertInstalled(kernel, "VFSClassLoader");
      assertInstalled(kernel, "TestBean");
      assertInstalled(kernel, "VFSClassLoader-unpacked");
      assertInstalled(kernel, "TestBean-unpacked");
      entry = registry.getEntry("TestBean");
      Object testBean = entry.getTarget();
      CodeSource testBeanCS = testBean.getClass().getProtectionDomain().getCodeSource();
      log.info("TestBean.CS: "+testBeanCS);
      log.info("TestBean.ClassLoader: "+testBean.getClass().getClassLoader());
     

      // Shutdown
      main.shutdown();
   }
View Full Code Here

TOP

Related Classes of org.jboss.Main

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.