diff options
Diffstat (limited to '')
-rw-r--r-- | branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/DefaultScopeRegistry.java (renamed from branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java) | 25 | ||||
-rw-r--r-- | branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java | 15 |
2 files changed, 16 insertions, 24 deletions
diff --git a/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/DefaultScopeRegistry.java index a1d4ddb2b1..94f26845ed 100644 --- a/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java +++ b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/DefaultScopeRegistry.java @@ -17,17 +17,24 @@ * under the License. */ -package org.apache.tuscany.sca.node; - - +package org.apache.tuscany.sca.core.scope; /** - * Represents an SCA processing node. - * A node is loaded with an SCA composites. It can start and stop that composite. + * A default scope registry implementation. * - * @version $Rev$ $Date$ - * @deprecated Use SCANode instead + * @version $Rev: $ $Date: $ */ -@Deprecated -public interface SCANode2 extends SCANode { +public class DefaultScopeRegistry extends ScopeRegistryImpl implements ScopeRegistry { + + public DefaultScopeRegistry() { + ScopeContainerFactory[] factories = + new ScopeContainerFactory[] {new CompositeScopeContainerFactory(), new StatelessScopeContainerFactory(), + new RequestScopeContainerFactory(), + new ConversationalScopeContainerFactory(null), + // new HttpSessionScopeContainer(monitor) + }; + for (ScopeContainerFactory f : factories) { + register(f); + } + } } diff --git a/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java b/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java index 2c91032653..bca649dbae 100644 --- a/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java +++ b/branches/sca-equinox/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java @@ -148,21 +148,6 @@ public abstract class SCANodeFactory { } /** - * Create a SCA node based on the discovery of the contribution on the classpath for the - * given classloader. This method should be treated a convinient shortcut with the following - * assumptions: - * <ul> - * <li>This is a standalone application and there is a deployable composite file on the classpath. - * <li>There is only one contribution which contains the deployable composite file physically in its packaging hierarchy. - * </ul> - * @param compositeURI The URI of the composite file relative to the root of the enclosing contribution - * @param classLoader The ClassLoader used to load the composite file as a resource. If the value is null, - * then thread context classloader will be used - * @return A newly created SCA node - */ - public abstract SCANode createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader); - - /** * Creates a new SCA node from the configuration URL * * @param configurationURL the URL of the node configuration which is the ATOM feed |