Package org.jboss.system

Examples of org.jboss.system.ServiceController


/*     */     {
/* 183 */       Thread.currentThread().setContextClassLoader(cl);
/*     */
/* 186 */       createMBean("org.jboss.system.server.ServerInfo", "jboss.system:type=ServerInfo");
/*     */
/* 190 */       this.controller = new ServiceController();
/* 191 */       this.controller.setKernel(this.kernel);
/* 192 */       this.controller.setMBeanServer(this.mbeanServer);
/* 193 */       this.mbeanServer.registerMBean(this.controller, new ObjectName("jboss.system:service=ServiceController"));
/*     */
/* 195 */       this.log.info("Legacy JMX core initialized");
View Full Code Here


/*    */ public class ConfigureAction extends ServiceControllerContextAction
/*    */ {
/*    */   public void installAction(ServiceControllerContext context)
/*    */     throws Throwable
/*    */   {
/* 46 */     ServiceController controller = context.getServiceController();
/* 47 */     MBeanServer server = controller.getMBeanServer();
/* 48 */     ObjectName objectName = context.getObjectName();
/*    */
/* 51 */     ServiceMetaData metaData = context.getServiceMetaData();
/* 52 */     if (metaData != null)
/*    */     {
View Full Code Here

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

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

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.