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


   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

      service.create();

      context.getServiceContext().state = ServiceContext.CREATED;
     
      ObjectName objectName = context.getObjectName();
      ServiceController serviceController = context.getServiceController();
      serviceController.sendControllerNotification(ServiceMBean.CREATE_EVENT, objectName);           
   }
View Full Code Here

         service.destroy();

         context.getServiceContext().state = ServiceContext.DESTROYED;

         ObjectName objectName = context.getObjectName();
         ServiceController serviceController = context.getServiceController();
         serviceController.sendControllerNotification(ServiceMBean.DESTROY_EVENT, objectName);           
      }
      catch (Throwable t)
      {
         log.debug("Error during destroy for " + context.getObjectName(), t);
      }
View Full Code Here

*/
public class ConfigureAction extends ServiceControllerContextAction
{
   public void installAction(ServiceControllerContext context) throws Throwable
   {
      ServiceController controller = context.getServiceController();
      MBeanServer server = controller.getMBeanServer();
      ObjectName objectName = context.getObjectName();

      // Configure any attributes
      ServiceMetaData metaData = context.getServiceMetaData();
      if (metaData != null)
View Full Code Here

      service.start();

      context.getServiceContext().state = ServiceContext.RUNNING;

      ObjectName objectName = context.getObjectName();
      ServiceController serviceController = context.getServiceController();
      serviceController.sendControllerNotification(ServiceMBean.START_EVENT, objectName);           
   }
View Full Code Here

         service.stop();

         context.getServiceContext().state = ServiceContext.STOPPED;

         ObjectName objectName = context.getObjectName();
         ServiceController serviceController = context.getServiceController();
         serviceController.sendControllerNotification(ServiceMBean.STOP_EVENT, objectName);           
      }
      catch (Throwable t)
      {
         log.debug("Error during stop for " + context.getObjectName(), t);
      }
View Full Code Here

/* 42 */     service.create();
/*    */
/* 44 */     context.getServiceContext().state = 2;
/*    */
/* 46 */     ObjectName objectName = context.getObjectName();
/* 47 */     ServiceController serviceController = context.getServiceController();
/* 48 */     serviceController.sendControllerNotification("org.jboss.system.ServiceMBean.create", objectName);
/*    */   }
View Full Code Here

/* 56 */       service.destroy();
/*    */
/* 58 */       context.getServiceContext().state = 6;
/*    */
/* 60 */       ObjectName objectName = context.getObjectName();
/* 61 */       ServiceController serviceController = context.getServiceController();
/* 62 */       serviceController.sendControllerNotification("org.jboss.system.ServiceMBean.destroy", objectName);
/*    */     }
/*    */     catch (Throwable t)
/*    */     {
/* 66 */       this.log.debug("Error during destroy for " + context.getObjectName(), t);
/*    */     }
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.