Package org.apache.tuscany.sca.host.embedded.impl

Examples of org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime


    @Init
    public void initialize() throws ParserConfigurationException {
       
        // Bootstrap a runtime to get a populated registry
        // FIXME Remove this later
        ReallySmallRuntime runtime = newRuntime();
        ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
       
        // Get model factories
        modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
View Full Code Here


                                              domainModel.getDomainURI() +
                                              " must be a valid url");
            }
               
            // create a runtime for the domain management services to run on
            domainManagementRuntime = new ReallySmallRuntime(domainClassLoader);
            domainManagementRuntime.start();
           
            // Configure the default server port and path
            int port = URI.create(domainModel.getDomainURI()).getPort();
            String path = URI.create(domainModel.getDomainURI()).getPath();
View Full Code Here

     * @throws Exception
     */
    private void initRuntime() throws Exception {

        // Create a node runtime
        runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
        runtime.start();

        // Get the various factories we need
        ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
        modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
View Full Code Here

           
            // if there is no node create a runtime otherwise use the runtime from the node
            if ((node == null) ||
                ( (node != null) && (node.getClass().equals(SCADummyNodeImpl.class)))){
                // create a runtime for the domain management services to run on
                domainManagementRuntime = new ReallySmallRuntime(domainClassLoader);
                domainManagementRuntime.start();
               
                String path = URI.create(domainModel.getDomainURI()).getPath();

                // invent a default URL for the runtime
View Full Code Here

       
   
    public TestDomain(String domainURI) {
        try {
            this.domainURI = domainURI;
            domainRuntime = new ReallySmallRuntime(cl);
            domainRuntime.start();
           
            AssemblyFactory assemblyFactory = domainRuntime.getAssemblyFactory();
            domainComposite = assemblyFactory.createComposite();
            domainComposite.setName(new QName(Constants.SCA10_NS, "domain"));
View Full Code Here

     *
     * @return
     */
    static ReallySmallRuntime newRuntime() {
        try {
            ReallySmallRuntime runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
            runtime.start();
            return runtime;
        } catch (ActivationException e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

     */
    @Init
    public void initialize() {

        // Get a runtime
        ReallySmallRuntime runtime = newRuntime();
       
        // Get its composite activator
        compositeActivator = runtime.getCompositeActivator();

        // Get the model factories
        ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
        ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class);
    }
View Full Code Here

    @Init
    public void initialize() throws ParserConfigurationException {
       
        // Bootstrap a runtime to get a populated registry
        // FIXME Remove this later
        ReallySmallRuntime runtime = newRuntime();
        ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
       
        // Get model factories
        modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
View Full Code Here

     * @throws Exception
     */
    private void initRuntime() throws Exception {

        // Create a node runtime
        runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
        runtime.start();
       
        // Get the various factories we need
        ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
        modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
View Full Code Here

        try {
            // Bootstrap a runtime to get a populated registry
            // FIXME needs to be tidied so we can get the registry without all of the other configuration
            //       that is being repeated below
            ReallySmallRuntime runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
            runtime.start();
            ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
           
            // Create model factories
            modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
            outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
            outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime

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.