Package org.jboss.system.microcontainer

Examples of org.jboss.system.microcontainer.ServiceControllerContext


/*     */   {
/* 263 */     KernelController controller = this.kernel.getController();
/* 264 */     metaData.setClassLoaderName(loaderName);
/* 265 */     ObjectName name = metaData.getObjectName();
/*     */
/* 268 */     ServiceControllerContext context = new ServiceControllerContext(this, metaData);
/*     */     try
/*     */     {
/* 271 */       doInstall(controller, context);
/* 272 */       doChange(controller, context, ControllerState.CONFIGURED, "configure");
/* 273 */       return context.getObjectName();
/*     */     }
/*     */     catch (Throwable t) {
/*     */     }
/* 277 */     throw DeploymentException.rethrowAsDeploymentException("Error during install " + name, t);
/*     */   }
View Full Code Here


/* 300 */     if (object == null) {
/* 301 */       throw new IllegalArgumentException("Null object");
/*     */     }
/* 303 */     KernelController controller = this.kernel.getController();
/*     */
/* 305 */     ServiceControllerContext context = new ServiceControllerContext(this, name, object);
/*     */     try
/*     */     {
/* 308 */       doInstall(controller, context);
/* 309 */       doChange(controller, context, ControllerState.CONFIGURED, "configure");
/*     */     }
View Full Code Here

/*     */     }
/*     */
/* 333 */     log.debug("Registering service " + serviceName);
/*     */
/* 336 */     KernelController controller = this.kernel.getController();
/* 337 */     ServiceControllerContext context = new ServiceControllerContext(this, serviceName);
/* 338 */     if (depends != null) {
/* 339 */       addDependencies(context, depends);
/*     */     }
/*     */
/*     */     try
View Full Code Here

/* 366 */       return;
/*     */     }
/*     */
/* 369 */     log.debug("Creating service " + serviceName);
/*     */
/* 372 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.get(serviceName);
/* 373 */     if (context == null)
/*     */     {
/* 375 */       register(serviceName, depends);
/* 376 */       context = (ServiceControllerContext)this.installed.get(serviceName);
/*     */     }
/* 378 */     ServiceContext ctx = context.getServiceContext();
/*     */
/* 381 */     if ((ctx.state == 2) || (ctx.state == 3) || (ctx.state == 4))
/*     */     {
/* 385 */       log.debug("Ignoring create request for service: " + ctx.objectName + " at state " + ctx.getStateString());
/* 386 */       return;
View Full Code Here

/* 406 */       return;
/*     */     }
/*     */
/* 409 */     log.debug("starting service " + serviceName);
/*     */
/* 412 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.get(serviceName);
/* 413 */     if (context == null)
/*     */     {
/* 415 */       register(serviceName, null);
/* 416 */       context = (ServiceControllerContext)this.installed.get(serviceName);
/*     */     }
/* 418 */     ServiceContext ctx = context.getServiceContext();
/*     */
/* 421 */     if ((ctx.state == 3) || (ctx.state == 4))
/*     */     {
/* 423 */       log.debug("Ignoring start request for service: " + ctx.objectName + " at state " + ctx.getStateString());
/* 424 */       return;
View Full Code Here

/* 457 */       return;
/*     */     }
/*     */
/* 460 */     log.debug("stopping service: " + serviceName);
/*     */
/* 462 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.get(serviceName);
/* 463 */     if (context == null)
/*     */     {
/* 465 */       log.warn("Ignoring request to stop nonexistent service: " + serviceName);
/* 466 */       return;
/*     */     }
/*     */
/* 470 */     ServiceContext ctx = context.getServiceContext();
/* 471 */     if (ctx.state != 3)
/*     */     {
/* 473 */       log.debug("Ignoring stop request for service: " + ctx.objectName + " at state " + ctx.getStateString());
/* 474 */       return;
/*     */     }
View Full Code Here

/* 494 */       return;
/*     */     }
/*     */
/* 497 */     log.debug("destroying service: " + serviceName);
/*     */
/* 499 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.get(serviceName);
/* 500 */     if (context == null)
/*     */     {
/* 502 */       log.warn("Ignoring request to destroy nonexistent service: " + serviceName);
/* 503 */       return;
/*     */     }
/*     */
/* 507 */     ServiceContext ctx = context.getServiceContext();
/* 508 */     if ((ctx.state == 6) || (ctx.state == 7) || (ctx.state == 4))
/*     */     {
/* 510 */       log.debug("Ignoring destroy request for service: " + ctx.objectName + " at state " + ctx.getStateString());
/* 511 */       return;
/*     */     }
View Full Code Here

/*     */     {
/* 530 */       log.warn("Ignoring request to remove null service: ", new Exception("STACKTRACE"));
/* 531 */       return;
/*     */     }
/*     */
/* 539 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.remove(objectName);
/* 540 */     if (context == null)
/*     */     {
/* 542 */       log.trace("Ignoring request to remove nonexistent service: " + objectName);
/* 543 */       return;
/*     */     }
View Full Code Here

/* 549 */     safelyRemoveAnyRegisteredContext(context);
/*     */   }
/*     */
/*     */   public ServiceContext getServiceContext(ObjectName serviceName)
/*     */   {
/* 554 */     ServiceControllerContext context = (ServiceControllerContext)this.installed.get(serviceName);
/* 555 */     if (context != null)
/* 556 */       return context.getServiceContext();
/* 557 */     return null;
/*     */   }
View Full Code Here

/* 566 */     int serviceCounter = 0;
/*     */
/* 569 */     ListIterator iterator = this.installedOrder.listIterator(this.installedOrder.size());
/* 570 */     while (iterator.hasPrevious())
/*     */     {
/* 572 */       ServiceControllerContext context = (ServiceControllerContext)iterator.previous();
/* 573 */       controller.uninstall(context.getName());
/* 574 */       serviceCounter++;
/*     */     }
/* 576 */     log.debug("Stopped " + serviceCounter + " services");
/*     */
/* 579 */     controller.uninstall(MBeanRegistration.OBJECT_NAME.getCanonicalName());
View Full Code Here

TOP

Related Classes of org.jboss.system.microcontainer.ServiceControllerContext

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.