Package org.jboss.system

Examples of org.jboss.system.ServiceController


   private void startServiceController() throws Exception
   {
      // I don't really need it, because I enforce dependencies by hand, but this will keep some
      // services happy.
      ServiceController sc = new ServiceController();
      mbeanServer.registerMBean(sc, SERVICE_CONTROLLER_OBJECT_NAME);
   }
View Full Code Here


  
         // General Purpose Architecture information --
         mbeanServer.registerMBean(serverInfo, new ObjectName("jboss.system:type=ServerInfo"));

         // Service Controller
         controller = new ServiceController();
         controller.setKernel(kernel);
         controller.setMBeanServer(mbeanServer);
         mbeanServer.registerMBean(controller, new ObjectName("jboss.system:service=ServiceController"));
  
         log.info("Legacy JMX core initialized");
View Full Code Here

      try
      {
         MBeanServer mbeanServer = createMBeanServer("jboss");
         try
         {
            ServiceController serviceController = new ServiceController();
            ObjectName objectName = new ObjectName("jboss.system:service=ServiceController");
            mbeanServer.registerMBean(serviceController, objectName);
            try
            {
               ClassLoader loader = Thread.currentThread().getContextClassLoader();
               mbeanServer.registerMBean(new JmxCL(loader), new ObjectName("jboss:service=defaultClassLoader"));

               BasicBootstrap bootstrap = new BasicBootstrap();
               bootstrap.run();
               Kernel kernel = bootstrap.getKernel();
               AbstractController controller = (AbstractController)kernel.getController();

               serviceController.setMBeanServer(mbeanServer);
               serviceController.setKernel(kernel);

               MainDeployerImpl mainDeployer = new MainDeployerImpl();
               mainDeployer.setStructuralDeployers(new StructuralDeployers()
               {
                  public DeploymentContext determineStructure(Deployment deployment) throws DeploymentException
View Full Code Here

      super(clazz);
   }
  
   public ServiceControllerMBean createServiceController() throws Exception
   {
      return new ServiceController();
   }
View Full Code Here

         AbstractBootstrap bootstrap = getBootstrap();
         bootstrap.run();
         kernel = bootstrap.getKernel();
        
         // Create the service controller
         ServiceController result = new ServiceController();
         result.setKernel(kernel);
         return result;
      }
      catch (RuntimeException e)
      {
         throw e;
View Full Code Here

   public void testNoMetaData() throws Throwable
   {
      ObjectName name = SimpleMBean.OBJECT_NAME;
      Simple test = new Simple();

      ServiceController serviceController = (ServiceController) getController();
      serviceController.install(name, test);
      try
      {
         assertServiceConfigured(name);
        
         MBeanServer server = getServer();
         Object instance = server.getAttribute(name, "Instance");
         assertNotNull(instance);
         assertTrue(test == instance);
      }
      finally
      {
         try
         {
            serviceController.remove(name);
         }
         catch (Exception ignored)
         {
         }
      }
View Full Code Here

   {
      ObjectName name = SimpleMBean.OBJECT_NAME;

      Simple test = new Simple();
     
      ServiceController serviceController = (ServiceController) getController();
      try
      {
         serviceController.install(null, test);
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
View Full Code Here

  
   public void testNoMetaDataNoObject() throws Throwable
   {
      ObjectName name = SimpleMBean.OBJECT_NAME;

      ServiceController serviceController = (ServiceController) getController();
      try
      {
         serviceController.install(name, null);
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
View Full Code Here

   private void startServiceController() throws Exception
   {
      // I don't really need it, because I enforce dependencies by hand, but this will keep some
      // services happy.
      ServiceController sc = new ServiceController();
      mbeanServer.registerMBean(sc, SERVICE_CONTROLLER_OBJECT_NAME);
   }
View Full Code Here

   private void startServiceController() throws Exception
   {
      // I don't really need it, because I enforce dependencies by hand, but this will keep some
      // services happy.
      ServiceController sc = new ServiceController();
      mbeanServer.registerMBean(sc, SERVICE_CONTROLLER_OBJECT_NAME);
   }
View Full Code Here

TOP

Related Classes of org.jboss.system.ServiceController

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.