Examples of ScopeRegistry


Examples of org.apache.tuscany.sca.core.scope.ScopeRegistry

                                        assemblyFactory, contributionFactory, inputFactory, policyDefinitions, registry, monitor);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories =
            new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(),
                                         new RequestScopeContainerFactory(),
                                         new ConversationalScopeContainerFactory(null),
            // new HttpSessionScopeContainer(monitor)
            };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        //FIXME Pass the scope container differently as it's not an extension point
        registry.addExtensionPoint(scopeRegistry);
View Full Code Here

Examples of org.apache.tuscany.sca.core.scope.ScopeRegistry

                                        assemblyFactory, contributionFactory, inputFactory, policyDefinitions, registry, monitor);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories =
            new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(),
                                         new RequestScopeContainerFactory(),
                                         new ConversationalScopeContainerFactory(null),
            // new HttpSessionScopeContainer(monitor)
            };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        //FIXME Pass the scope container differently as it's not an extension point
        registry.addExtensionPoint(scopeRegistry);
View Full Code Here

Examples of org.apache.tuscany.sca.core.scope.ScopeRegistry

                                        assemblyFactory, contributionFactory, inputFactory, policyDefinitions, registry, monitor);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories =
            new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(),
                                         new RequestScopeContainerFactory(),
                                         new ConversationalScopeContainerFactory(null),
            // new HttpSessionScopeContainer(monitor)
            };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        //FIXME Pass the scope container differently as it's not an extension point
        registry.addExtensionPoint(scopeRegistry);
View Full Code Here

Examples of org.apache.tuscany.sca.core.scope.ScopeRegistry

                                        assemblyFactory, contributionFactory, inputFactory, policyDefinitions, registry, monitor);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories =
            new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(),
                                         new RequestScopeContainerFactory(),
                                         new ConversationalScopeContainerFactory(null),
            // new HttpSessionScopeContainer(monitor)
            };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        //FIXME Pass the scope container differently as it's not an extension point
        registry.addExtensionPoint(scopeRegistry);
View Full Code Here

Examples of org.apache.tuscany.sca.core.scope.ScopeRegistry

                                        assemblyFactory, contributionFactory, xmlFactory);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories =
            new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(),
                                         new RequestScopeContainerFactory(),
                                         new ConversationalScopeContainerFactory(null),
            // new HttpSessionScopeContainer(monitor)
            };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        //FIXME Pass the scope container differently as it's not an extension point
        registry.addExtensionPoint(scopeRegistry);
View Full Code Here

Examples of org.apache.tuscany.sca.scope.ScopeRegistry

                                                                              contributionFactory, xmlFactory);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories = new ScopeContainerFactory[] {new CompositeScopeContainerFactory(),
                                                                         new StatelessScopeContainerFactory(),
                                                                         new RequestScopeContainerFactory(),
        // new ConversationalScopeContainer(monitor),
        // new HttpSessionScopeContainer(monitor)
        };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        registry.addExtensionPoint(scopeRegistry);

        return scopeRegistry;
View Full Code Here

Examples of org.apache.tuscany.sca.scope.ScopeRegistry

                                                                              contributionFactory, xmlFactory);
        return contributionService;
    }

    public static ScopeRegistry createScopeRegistry(ExtensionPointRegistry registry) {
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl();
        ScopeContainerFactory[] factories = new ScopeContainerFactory[] {new CompositeScopeContainerFactory(),
                                                                         new StatelessScopeContainerFactory(),
                                                                         new RequestScopeContainerFactory(),
        // new ConversationalScopeContainer(monitor),
        // new HttpSessionScopeContainer(monitor)
        };
        for (ScopeContainerFactory f : factories) {
            scopeRegistry.register(f);
        }

        registry.addExtensionPoint(scopeRegistry);

        return scopeRegistry;
View Full Code Here

Examples of org.apache.tuscany.spi.component.ScopeRegistry

* @version $$Rev: 450456 $$ $$Date: 2006-09-27 07:28:36 -0700 (Wed, 27 Sep 2006) $$
*/
public class ScopeRegistryTestCase extends TestCase {
    public void testScopeContextCreation() throws Exception {
        WorkContext workContext = new WorkContextImpl();
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl(workContext);
        scopeRegistry.registerFactory(Scope.REQUEST, new RequestScopeObjectFactory());
        scopeRegistry.registerFactory(Scope.SESSION, new HttpSessionScopeObjectFactory(scopeRegistry));
        ScopeContainer request = scopeRegistry.getScopeContainer(Scope.REQUEST);
        assertTrue(request instanceof RequestScopeContainer);
        assertSame(request, scopeRegistry.getScopeContainer(Scope.REQUEST));
        ScopeContainer session = scopeRegistry.getScopeContainer(Scope.SESSION);
        assertTrue(session instanceof HttpSessionScopeContainer);
        assertSame(session, scopeRegistry.getScopeContainer(Scope.SESSION));
        assertNotSame(request, session);
    }
View Full Code Here

Examples of org.apache.tuscany.spi.component.ScopeRegistry

        assertNotSame(request, session);
    }

    public void testDeregisterFactory() throws Exception {
        WorkContext workContext = new WorkContextImpl();
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl(workContext);
        RequestScopeObjectFactory factory = new RequestScopeObjectFactory();
        scopeRegistry.registerFactory(Scope.REQUEST, factory);
        scopeRegistry.deregisterFactory(Scope.REQUEST);
        try {
            scopeRegistry.getScopeContainer(Scope.REQUEST);
            fail();
        } catch (ScopeNotFoundException e) {
            // expected
        }
    }
View Full Code Here

Examples of org.apache.tuscany.spi.component.ScopeRegistry

        }
    }

    public void testScopeNotRegistered() throws Exception {
        WorkContext workContext = new WorkContextImpl();
        ScopeRegistry scopeRegistry = new ScopeRegistryImpl(workContext);
        try {
            scopeRegistry.getScopeContainer(Scope.REQUEST);
            fail();
        } catch (ScopeNotFoundException e) {
            // expected
        }
        try {
            scopeRegistry.getScopeContainer(Scope.SESSION);
            fail();
        } catch (ScopeNotFoundException e) {
            // expected
        }
        try {
            scopeRegistry.getScopeContainer(Scope.STATELESS);
            fail();
        } catch (ScopeNotFoundException e) {
            // expected
        }
    }
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.