Package org.jboss.system.microcontainer

Examples of org.jboss.system.microcontainer.ServiceControllerContext$PreprocessMetaDataVisitor


      // Removal can be attempted twice, this is because ServiceMBeanSupport does a "double check"
      // to make sure the ServiceController is tidied up
      // However, if the tidyup is done correctly, it invokes this method recursively:
      // ServiceController::remove -> MBeanServer::unregisterMBean
      // ServiceMBeanSupport::postDeregister -> ServiceController::remove
      ServiceControllerContext context = installed.remove(objectName);
      if (context == null)
      {
         log.trace("Ignoring request to remove nonexistent service: " + objectName);
         return;
      }
View Full Code Here


      safelyRemoveAnyRegisteredContext(context);
   }

   public ServiceContext getServiceContext(ObjectName serviceName)
   {
      ServiceControllerContext context = installed.get(serviceName);
      if (context != null)
         return context.getServiceContext();
      return null;
   }
View Full Code Here

      // Uninstall all the contexts we know about
      ListIterator<ServiceControllerContext> iterator = installedOrder.listIterator(installedOrder.size());
      while (iterator.hasPrevious())
      {
         ServiceControllerContext context = iterator.previous();
         controller.uninstall(context.getName());
         ++serviceCounter;
      }
      log.debug("Stopped " + serviceCounter + " services");
     
      // Shutdown ourselves
View Full Code Here

         log.fatal("Registration of ServiceController failed");
      else
      {
         // Register the ServiceController as a running service
         KernelController controller = kernel.getController();
         ServiceControllerContext context = new ServiceControllerContext(this, ServiceControllerMBean.OBJECT_NAME);
         context.setMode(ControllerMode.AUTOMATIC);
         try
         {
            controller.install(context);
         }
         catch (Throwable t)
View Full Code Here

      return result;
   }

   public void visit(ServiceMetaDataVisitor visitor)
   {
      ServiceControllerContext context = visitor.getControllerContext();
      Object name = context.getName();
      ControllerState whenRequired = visitor.getContextState();

      DependencyItem item = new AbstractDependencyItem(name, dependency, whenRequired, dependentState);
      visitor.addDependency(item);
View Full Code Here

      return objectName;
   }

   public void visit(ServiceMetaDataVisitor visitor)
   {
      ServiceControllerContext context = visitor.getControllerContext();
      Object name = context.getName();
      Object other = dependency;
      try
      {
         other = getObjectName().getCanonicalName();
      }
View Full Code Here

      return getObjectNames();
   }

   public void visit(ServiceMetaDataVisitor visitor)
   {
      ServiceControllerContext context = visitor.getControllerContext();
      Object name = context.getName();
      List<String> list = dependencies;
      try
      {
         List<ObjectName> names = getObjectNames();
         list = new ArrayList<String>(names.size());
View Full Code Here

      this.iDependOnObjectName = iDependOn;
   }

   public void visit(ServiceMetaDataVisitor visitor)
   {
      ServiceControllerContext context = visitor.getControllerContext();
      Object name = context.getName();
      Object other = iDependOn;
      try
      {
         other = getIDependOnObjectName().getCanonicalName();
      }
View Full Code Here

      return result;
   }

   public void visit(ServiceMetaDataVisitor visitor)
   {
      ServiceControllerContext context = visitor.getControllerContext();
      Object name = context.getName();
      ControllerState whenRequired = visitor.getContextState();

      DependencyItem item = new AbstractDependencyItem(name, dependency, whenRequired, dependentState);
      visitor.addDependency(item);
View Full Code Here

/*     */
/* 236 */     for (ServiceMetaData metaData : metaDatas)
/*     */     {
/* 238 */       metaData.setClassLoaderName(loaderName);
/*     */
/* 241 */       ServiceControllerContext context = new ServiceControllerContext(this, metaData);
/*     */       try
/*     */       {
/* 244 */         doInstall(controller, context);
/* 245 */         contexts.add(context);
/* 246 */         doChange(controller, context, ControllerState.CONFIGURED, "configure");
/* 247 */         result.add(context.getObjectName());
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/* 252 */         for (ServiceControllerContext ctx : contexts) {
/* 253 */           safelyRemoveAnyRegisteredContext(ctx);
View Full Code Here

TOP

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

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.