Package org.apache.tuscany.sca.core.assembly

Examples of org.apache.tuscany.sca.core.assembly.CompositeActivator


                throw new ServiceRuntimeException(e);
            }
        }

        // Activate and start composites
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        compositeActivator.setDomainComposite(domainComposite);
        for (Composite composite: domainComposite.getIncludes()) {
            try {
                compositeActivator.activate(composite);
            } catch (ActivationException e) {
                throw new ServiceRuntimeException(e);
            }
        }
        for (Composite composite: domainComposite.getIncludes()) {
            try {
                for (Component component : composite.getComponents()) {
                    compositeActivator.start(component);
                }
            } catch (ActivationException e) {
                throw new ServiceRuntimeException(e);
            }
        }
View Full Code Here


    public void close() {
       
        super.close();

        // Stop and deactivate composites
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        for (Composite composite: domainComposite.getIncludes()) {
            try {
                for (Component component : composite.getComponents()) {
                    compositeActivator.stop(component);
                }
            } catch (ActivationException e) {
                throw new ServiceRuntimeException(e);
            }
        }
        for (Composite composite: domainComposite.getIncludes()) {
            try {
                compositeActivator.deactivate(composite);
            } catch (ActivationException e) {
                throw new ServiceRuntimeException(e);
            }
        }
View Full Code Here

    public void startComponent(String componentName) throws ActivationException {
        Component component = getComponent(componentName);
        if (component == null) {
            throw new IllegalArgumentException("no component: " + componentName);
        }
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        compositeActivator.start(component);
    }
View Full Code Here

    public void stopComponent(String componentName) throws ActivationException {
        Component component = getComponent(componentName);
        if (component == null) {
            throw new IllegalArgumentException("no component: " + componentName);
        }
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        compositeActivator.stop(component);
    }
View Full Code Here

        JavaInterfaceFactory javaInterfaceFactory = registry.getExtensionPoint(ModelFactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
        RequestContextFactory requestContextFactory = registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class);
      
        // Create the composite activator
        CompositeActivator compositeActivator =
            new CompositeActivatorImpl(assemblyFactory, javaInterfaceFactory, scaBindingFactory, mapper, scopeRegistry, workScheduler,
                                       wireProcessor, requestContextFactory, proxyFactory, providerFactories, processors);

        return compositeActivator;
    }
View Full Code Here

    /**
     * @return
     */
    public static CompositeContext getCurrentCompositeContext() {
        CompositeActivator activator = getCurrentCompositeActivator();
        if (activator != null) {
            return activator.getCompositeContext();
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    public static CompositeContext getCurrentCompositeContext() {
        CompositeActivator activator = getCurrentCompositeActivator();
        if (activator != null) {
            return activator.getCompositeContext();
        }
        return null;
    }
View Full Code Here

        monitor = monitorFactory.createMonitor();
       
        StAXArtifactProcessorExtensionPoint xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        compositeProcessor = xmlProcessors.getProcessor(Composite.class);
       
        CompositeActivator compositeActivator = utilities.getUtility(CompositeActivator.class);
        domainComposite = compositeActivator.getDomainComposite();
    }
View Full Code Here

        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        ConversationManager conversationManager = utilities.getUtility(ConversationManager.class);

        // Create the composite activator
        CompositeActivator compositeActivator =
            new CompositeActivatorImpl(assemblyFactory, messageFactory, javaInterfaceFactory, scaBindingFactory,
                                       mapper, scopeRegistry, workScheduler, wireProcessor, requestContextFactory,
                                       proxyFactory, providerFactories, endpointResolverFactories, processors,
                                       conversationManager);
View Full Code Here

        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        ConversationManager conversationManager = utilities.getUtility(ConversationManager.class);
       
        // Create the composite activator
        CompositeActivator compositeActivator =
            new CompositeActivatorImpl(assemblyFactory, messageFactory, javaInterfaceFactory, scaBindingFactory,
                                       mapper, scopeRegistry, workScheduler, wireProcessor, requestContextFactory,
                                       proxyFactory, providerFactories, endpointResolverFactories, processors, conversationManager);

        return compositeActivator;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.assembly.CompositeActivator

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.