Examples of ServiceRegistry


Examples of org.impalaframework.service.ServiceRegistry

        Assert.notNull(moduleStateHolderFactory, "moduleStateHolderFactory cannot be null");
        Assert.notNull(serviceRegistryFactory, "serviceRegistryFactory cannot be null");
       
        ClassLoaderRegistry classLoaderRegistry = classLoaderRegistryFactory.newClassLoaderRegistry();
        ModuleStateHolder moduleStateHolder = moduleStateHolderFactory.newModuleStateHolder();
        ServiceRegistry serviceRegistry = serviceRegistryFactory.newServiceRegistry();
        Application application = new ImpalaApplication(classLoaderRegistry, moduleStateHolder, serviceRegistry, id);
   
        return application;
    }
View Full Code Here

Examples of org.jboss.forge.container.services.ServiceRegistry

                  ClassLoader addonClassLoader = addon.getClassLoader();
                  if (!(event.getClass().getClassLoader().equals(addonClassLoader)
                           || contextClassLoader.equals(addonClassLoader)
                           || ClassLoader.getSystemClassLoader().equals(eventClassLoader)))
                  {
                     ServiceRegistry addonServiceRegistry = addon.getServiceRegistry();
                     BeanManager manager = addonServiceRegistry.getExportedInstance(BeanManager.class).get();
                     manager.fireEvent(event, qualifiers.toArray(new Annotation[] {}));
                  }
               }
            }
         }
View Full Code Here

Examples of org.jboss.forge.furnace.services.ServiceRegistry

         for (Addon addon : addonRegistry.getAddons())
         {
            if (addon.getStatus().isStarted())
            {
               ServiceRegistry registry = addon.getServiceRegistry();
               ExportedInstance<?> exportedInstance = registry.getExportedInstance(testClassName);

               if (exportedInstance != null)
               {
                  if (testInstance == null)
                  {
View Full Code Here

Examples of org.jboss.forge.furnace.spi.ServiceRegistry

            for (Addon addon : addonRegistry.getAddons())
            {
               if (addon.getStatus().isStarted())
               {
                  ServiceRegistry registry = addon.getServiceRegistry();
                  ExportedInstance<?> exportedInstance = registry.getExportedInstance(testClassName);

                  if (exportedInstance != null)
                  {
                     if (testInstance == null)
                     {
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        }
        return new StandardResourceDescriptionResolver(prefix.toString(), RESOURCE_NAME, TransactionExtension.class.getClassLoader(), true, false);
    }

    static MBeanServer getMBeanServer(OperationContext context) {
        final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
        final ServiceController<?> serviceController = serviceRegistry.getService(MBEAN_SERVER_SERVICE_NAME);
        if (serviceController == null) {
            throw TransactionMessages.MESSAGES.jmxSubsystemNotInstalled();
        }
        return (MBeanServer) serviceController.getValue();
    }
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        final String name = address.getLastElement().getValue();

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(final OperationContext context, ModelNode operation) {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    final ServiceController<?> controller = serviceRegistry.getService(LogServices.handlerName(name));
                    if (controller != null) {
                        controller.addListener(new AbstractServiceListener<Object>() {
                            public void listenerAdded(ServiceController<?> serviceController) {
                                serviceController.setMode(ServiceController.Mode.NEVER);
                            }
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        final String name = address.getLastElement().getValue();

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(final OperationContext context, ModelNode operation) {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    final ServiceController<?> controller = serviceRegistry.getService(LogServices.handlerName(name));
                    if (controller != null) {
                        controller.addListener(new AbstractServiceListener<Object>() {
                            public void listenerAdded(ServiceController<?> serviceController) {
                                serviceController.setMode(ServiceController.Mode.ACTIVE);
                            }
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        updateModel(operation, model);

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    final ServiceController<Handler> controller = (ServiceController<Handler>) serviceRegistry.getService(LogServices.handlerName(name));
                    if (controller != null) {
                        final Handler handler = controller.getValue();
                        if (operation.hasDefined(LEVEL)) {
                            handler.setLevel(Level.parse(operation.get(LEVEL).asString()));
                        }
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        context.readModelForUpdate(PathAddress.EMPTY_ADDRESS).get(CommonAttributes.LEVEL).set(level);

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    final ServiceController<Logger> controller = (ServiceController<Logger>) serviceRegistry.getService(LogServices.loggerName(name));
                    if (controller != null) {
                        controller.getValue().setLevel(Level.parse(level));
                    }
                    context.completeStep();
                }
View Full Code Here

Examples of org.jboss.msc.service.ServiceRegistry

        final String name = address.getLastElement().getValue();

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(final OperationContext context, final ModelNode operation) {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    final ServiceTarget serviceTarget = context.getServiceTarget();

                    final ServiceController<?> controller = serviceRegistry.getService(LogServices.handlerFileName(name));
                    if (controller != null) {
                        controller.addListener(new AbstractServiceListener<Object>() {
                            public void listenerAdded(ServiceController<?> controller) {
                                controller.setMode(ServiceController.Mode.REMOVE);
                            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.