Package org.jboss.system.microcontainer

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


   {
      try
      {
         Controller controller = serviceController.getKernel().getController();
         ObjectName bshScriptName = getBshScriptName(script, deploymentUnit);
         ServiceControllerContext context = new ServiceControllerContext(serviceController, bshScriptName, script);
         context.setMode(mode);
         ObjectName[] depends = script.getDependsServices();
         if (depends != null)
            addDependencies(context, Arrays.asList(depends));

         if (log.isTraceEnabled())
View Full Code Here


       *
       */
      @Override
      public void visit(ServiceMetaDataVisitor visitor)
      {
         ServiceControllerContext context = visitor.getControllerContext();
         Object name = context.getName();
         Object dependency = this.getIDependOn();
         try
         {
            dependency = getIDependOnObjectName().getCanonicalName();
         }
View Full Code Here

      for (ServiceMetaData metaData : metaDatas)
      {
         metaData.setClassLoaderName(loaderName);

         // Install the context to the configured level
         ServiceControllerContext context = new ServiceControllerContext(this, metaData);
         try
         {
            doInstall(controller, context);
            contexts.add(context);
            doChange(controller, context, ControllerState.CONFIGURED, "configure");
            result.add(context.getObjectName());
         }
         catch (Throwable t)
         {
            // Something went wrong
            for (ServiceControllerContext ctx : contexts)
View Full Code Here

      KernelController controller = kernel.getController();
      metaData.setClassLoaderName(loaderName);
      ObjectName name = metaData.getObjectName();
     
      // Install the context to the configured level
      ServiceControllerContext context = new ServiceControllerContext(this, metaData);
      try
      {
         doInstall(controller, context);
         doChange(controller, context, ControllerState.CONFIGURED, "configure");
         return context.getObjectName();
      }
      catch (Throwable t)
      {
         throw rethrow("Error during install " + name, t);
      }
View Full Code Here

      if (object == null)
         throw new IllegalArgumentException("Null object");

      KernelController controller = kernel.getController();

      ServiceControllerContext context = new ServiceControllerContext(this, name, object);
      try
      {
         doInstall(controller, context);
         doChange(controller, context, ControllerState.CONFIGURED, "configure");
      }
View Full Code Here

     
      log.debug("Registering service " + serviceName);

      // This is an already registered mbean
      KernelController controller = kernel.getController();
      ServiceControllerContext context = new ServiceControllerContext(this, serviceName, includeLifecycle, target);
      if (depends != null)
         addDependencies(context, depends);

      // Install the context to the configured level
      try
View Full Code Here

      }
     
      log.debug("Creating service " + serviceName);
     
      // Register if not already done so
      ServiceControllerContext context = installed.get(serviceName);
      if (context == null)
      {
         register(serviceName, depends);
         context = installed.get(serviceName);
      }
      ServiceContext ctx = context.getServiceContext();

      // If we are already created (can happen in dependencies) or failed just return
      if (ctx.state == ServiceContext.CREATED
            || ctx.state == ServiceContext.RUNNING
            || ctx.state == ServiceContext.FAILED)
View Full Code Here

      }

      log.debug("starting service " + serviceName);
     
      // Register if not already done so
      ServiceControllerContext context = installed.get(serviceName);
      if (context == null)
      {
         register(serviceName, null);
         context = installed.get(serviceName);
      }
      ServiceContext ctx = context.getServiceContext();

      // If we are already started (can happen in dependencies) just return
      if (ctx.state == ServiceContext.RUNNING || ctx.state == ServiceContext.FAILED)
      {
         log.debug("Ignoring start request for service: " + ctx.objectName + " at state " + ctx.getStateString());
View Full Code Here

         return;
      }

      log.debug("stopping service: " + serviceName);

      ServiceControllerContext context = installed.get(serviceName);
      if (context == null)
      {
         log.warn("Ignoring request to stop nonexistent service: " + serviceName);
         return;
      }

      // If we are already stopped (can happen in dependencies) just return
      ServiceContext ctx = context.getServiceContext();
      if (ctx.state != ServiceContext.RUNNING)
      {
         log.debug("Ignoring stop request for service: " + ctx.objectName + " at state " + ctx.getStateString());
         return;
      }
View Full Code Here

         return;
      }

      log.debug("destroying service: " + serviceName);

      ServiceControllerContext context = installed.get(serviceName);
      if (context == null)
      {
         log.warn("Ignoring request to destroy nonexistent service: " + serviceName);
         return;
      }

      // If we are already destroyed (can happen in dependencies) just return
      ServiceContext ctx = context.getServiceContext();
      if (ctx.state == ServiceContext.DESTROYED || ctx.state == ServiceContext.NOTYETINSTALLED || ctx.state == ServiceContext.FAILED)
      {
         log.debug("Ignoring destroy request for service: " + ctx.objectName + " at state " + ctx.getStateString());
         return;
      }
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.