diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-27 14:49:11 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-27 14:49:11 +0000 |
commit | 645a4e2e374d891cf215d11ef1ae2f046d676b08 (patch) | |
tree | c5169840cce2a60cbbd82981852542c84a7787bc /java/sca/modules/core/src | |
parent | 7e638d75169c353993547709aeae52c3d262465b (diff) |
Throw exception if scope container isn't running (need to do similar for all the scope containers, this is just to start getting things working)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@808439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core/src')
-rw-r--r-- | java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/StatelessScopeContainer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/StatelessScopeContainer.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/StatelessScopeContainer.java index 0639b8885b..1235fd2a67 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/StatelessScopeContainer.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/StatelessScopeContainer.java @@ -37,8 +37,10 @@ public class StatelessScopeContainer<KEY> extends AbstractScopeContainer<KEY> { } @Override - public InstanceWrapper getWrapper(KEY contextId) - throws TargetResolutionException { + public InstanceWrapper getWrapper(KEY contextId) throws TargetResolutionException { + if (lifecycleState != RUNNING) { + throw new TargetResolutionException("scope container not running, lifecycleState=" + lifecycleState); + } InstanceWrapper ctx = createInstanceWrapper(); ctx.start(); return ctx; |