tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r412264 - in /incubator/tuscany/sandbox/jboynes/sca: containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/ core2/src/main/java/org/apache/tuscany/core/component/ core2/src/main/java/org/apache/tuscany/core/component...
Date Wed, 07 Jun 2006 03:18:23 GMT
Author: jmarino
Date: Tue Jun  6 20:18:22 2006
New Revision: 412264

URL: http://svn.apache.org/viewvc?rev=412264&view=rev
Log:
internalization of InstanceWrapper to scope context implementations; i.e. it is no longer
required for extensions

Added:
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
  (contents, props changed)
      - copied, changed from r412208, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/InstanceWrapper.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
  (contents, props changed)
      - copied, changed from r412205, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoInstanceWrapper.java
Removed:
    incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyInstanceWrapper.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoInstanceWrapper.java
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/InstanceWrapper.java
Modified:
    incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/SystemAtomicComponentTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java

Modified: incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyAtomicComponent.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyAtomicComponent.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/main/java/org/apache/tuscany/container/groovy/GroovyAtomicComponent.java
Tue Jun  6 20:18:22 2006
@@ -25,14 +25,13 @@
 import groovy.lang.GroovyObject;
 import org.apache.tuscany.spi.ObjectCreationException;
 import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
-import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.ScopeContainer;
+import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.extension.AtomicComponentExtension;
 import org.apache.tuscany.spi.model.Scope;
+import org.apache.tuscany.spi.wire.InboundWire;
 import org.apache.tuscany.spi.wire.OutboundWire;
 import org.apache.tuscany.spi.wire.TargetInvoker;
-import org.apache.tuscany.spi.wire.InboundWire;
 import org.apache.tuscany.spi.wire.WireService;
 import org.codehaus.groovy.control.CompilationFailedException;
 
@@ -52,7 +51,7 @@
                                  CompositeComponent parent,
                                  ScopeContainer scopeContainer,
                                  WireService wireService) {
-        super(name, parent, scopeContainer,wireService);
+        super(name, parent, scopeContainer, wireService);
         this.script = script;
         this.services = services;
         this.scope = scope;
@@ -71,7 +70,7 @@
         return new GroovyInvoker(method.getName(), this);
     }
 
-    public InstanceWrapper createInstance() throws ObjectCreationException {
+    public Object createInstance() throws ObjectCreationException {
         try {
             ClassLoader parent = getClass().getClassLoader();
             GroovyClassLoader loader = new GroovyClassLoader(parent);
@@ -87,7 +86,7 @@
                     object.setProperty(wire.getReferenceName(), wireService.createProxy(wire));
                 }
             }
-            return new GroovyInstanceWrapper(this, object);
+            return object;
         } catch (CompilationFailedException e) {
             throw new ObjectCreationException(e);
         } catch (IllegalAccessException e) {
@@ -111,7 +110,7 @@
     public Object getServiceInstance(String service) throws TargetException {
         InboundWire<?> wire = getInboundWire(service);
         if (wire == null) {
-            TargetException e =  new TargetException("ServiceDefinition not found"); // TODO
better error message
+            TargetException e = new TargetException("ServiceDefinition not found"); // TODO
better error message
             e.setIdentifier(service);
             throw e;
         }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
Tue Jun  6 20:18:22 2006
@@ -21,7 +21,6 @@
 import org.apache.tuscany.spi.ObjectFactory;
 import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.ScopeContainer;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.extension.AtomicComponentExtension;
@@ -121,15 +120,14 @@
         return (T) scopeContainer.getInstance(this);
     }
 
-    public InstanceWrapper createInstance() throws ObjectCreationException {
+    public Object createInstance() throws ObjectCreationException {
         Object instance = objectFactory.getInstance();
-        InstanceWrapper ctx = new PojoInstanceWrapper(this, instance);
+        //InstanceWrapper ctx = new InstanceWrapperImpl(this, instance);
         // inject the instance with properties and references
         for (Injector<Object> injector : injectors) {
             injector.inject(instance);
         }
-        ctx.start();
-        return ctx;
+        return instance;
     }
 
     public void onReferenceWire(OutboundWire wire) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -8,7 +8,6 @@
 
 import org.apache.tuscany.spi.AbstractLifecycle;
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.ScopeContainer;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.WorkContext;
@@ -114,4 +113,6 @@
     public String toString() {
         return "ScopeContainer [" + name + "] in state [" + super.toString() + ']';
     }
+
+    protected abstract InstanceWrapper getInstanceWrapper(AtomicComponent component);
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -9,7 +9,6 @@
 import org.apache.tuscany.core.component.event.HttpSessionEnd;
 import org.apache.tuscany.core.component.event.HttpSessionStart;
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.event.Event;
@@ -76,7 +75,7 @@
 
     }
 
-    public InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
         Object key = workContext.getIdentifier(HTTP_IDENTIFIER);
         assert(key != null):"HTTP session key not bound in work component";
         return getInstance(component, key);
@@ -86,7 +85,8 @@
         Map<Object, InstanceWrapper> wrappers = contexts.get(component);
         InstanceWrapper ctx = wrappers.get(key);
         if (ctx == null) {
-            ctx = component.createInstance();
+            ctx = new InstanceWrapperImpl(component, component.createInstance());
+            ctx.start();
             wrappers.put(key, ctx);
             List<InstanceWrapper> destroyQueue = destroyQueues.get(key);
             if (destroyQueue == null) {

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
(from r412208, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/InstanceWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java&p1=incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/InstanceWrapper.java&r1=412208&r2=412264&rev=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/InstanceWrapper.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
Tue Jun  6 20:18:22 2006
@@ -14,13 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.tuscany.spi.component;
+package org.apache.tuscany.core.component.scope;
 
 import org.apache.tuscany.spi.Lifecycle;
 
 /**
- * Provides lifecycle management for an implementation instance associated with an {@link
AtomicComponent} for
- * use by the atomic context's associated {@link ScopeContainer}
+ * Provides lifecycle management for an implementation instance associated with an {@link
org.apache.tuscany.spi.component.AtomicComponent} for
+ * use by the atomic context's associated {@link org.apache.tuscany.spi.component.ScopeContainer}
  *
  * @version $Rev$ $Date$
  */

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
(from r412205, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoInstanceWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoInstanceWrapper.java&r1=412205&r2=412264&rev=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoInstanceWrapper.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
Tue Jun  6 20:18:22 2006
@@ -11,24 +11,23 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.apache.tuscany.core.component;
+package org.apache.tuscany.core.component.scope;
 
 import org.apache.tuscany.spi.AbstractLifecycle;
 import org.apache.tuscany.spi.CoreRuntimeException;
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 
 /**
- * Manages a Java class-based implementation instance
+ * Default implementation of an <code>InstanceWrapper</code>
  *
  * @version $$Rev$$ $$Date$$
  */
-public class PojoInstanceWrapper extends AbstractLifecycle implements InstanceWrapper {
+public class InstanceWrapperImpl extends AbstractLifecycle implements InstanceWrapper {
 
     private Object instance;
     private AtomicComponent component;
 
-    public PojoInstanceWrapper(AtomicComponent component, Object instance) {
+    public InstanceWrapperImpl(AtomicComponent component, Object instance) {
         assert(component != null);
         assert(instance != null);
         this.component = component;

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -11,7 +11,6 @@
 import org.apache.tuscany.spi.AbstractLifecycle;
 import org.apache.tuscany.spi.CoreRuntimeException;
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.event.Event;
@@ -94,12 +93,13 @@
     }
 
 
-    public InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
         checkInit();
         InstanceWrapper ctx = instanceContexts.get(component);
         assert ctx != null : "SCAObject not registered with scope: " + component;
         if (ctx == EMPTY) {
-            ctx = component.createInstance();
+            ctx = new InstanceWrapperImpl(component, component.createInstance());
+            ctx.start();
             instanceContexts.put(component, ctx);
             synchronized (destroyQueue) {
                 destroyQueue.add(ctx);
@@ -112,9 +112,10 @@
         for (Map.Entry<AtomicComponent, InstanceWrapper> entry : instanceContexts.entrySet())
{
             AtomicComponent component = entry.getKey();
             if (component.isEagerInit()) {
-                InstanceWrapper instanceCtx = component.createInstance();
-                instanceContexts.put(component, instanceCtx);
-                destroyQueue.add(instanceCtx);
+                InstanceWrapper ctx = new InstanceWrapperImpl(component, component.createInstance());
+                ctx.start();
+                instanceContexts.put(component, ctx);
+                destroyQueue.add(ctx);
             }
         }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -9,7 +9,6 @@
 import org.apache.tuscany.core.component.event.RequestEnd;
 import org.apache.tuscany.core.component.event.RequestStart;
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.event.Event;
@@ -71,12 +70,13 @@
         contexts.put(component, new ConcurrentHashMap<Thread, InstanceWrapper>());
     }
 
-    public InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
         Map<Thread, InstanceWrapper> instanceContextMap = contexts.get(component);
         assert(instanceContextMap != null):"Atomic component not registered";
         InstanceWrapper ctx = instanceContextMap.get(Thread.currentThread());
         if (ctx == null) {
-            ctx = component.createInstance();
+            ctx = new InstanceWrapperImpl(component, component.createInstance());
+            ctx.start();
             instanceContextMap.put(Thread.currentThread(), ctx);
             List<InstanceWrapper> destroyQueue = destroyQueues.get(Thread.currentThread());
             if (destroyQueue == null) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -14,7 +14,6 @@
 package org.apache.tuscany.core.component.scope;
 
 import org.apache.tuscany.spi.component.AtomicComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.event.Event;
@@ -61,8 +60,10 @@
         checkInit();
     }
 
-    public InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
-        return component.createInstance();
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException
{
+        InstanceWrapper ctx = new InstanceWrapperImpl(component, component.createInstance());
+        ctx.start();
+        return ctx;
     }
 
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java
Tue Jun  6 20:18:22 2006
@@ -8,7 +8,6 @@
 import org.apache.tuscany.spi.ObjectCreationException;
 import org.apache.tuscany.spi.component.AbstractSCAObject;
 import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.component.InstanceWrapper;
 import org.apache.tuscany.spi.component.TargetException;
 import org.apache.tuscany.spi.model.Scope;
 import org.apache.tuscany.spi.wire.InboundWire;
@@ -68,7 +67,7 @@
 
     }
 
-    public InstanceWrapper createInstance() throws ObjectCreationException {
+    public Object createInstance() throws ObjectCreationException {
         throw new UnsupportedOperationException();
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/SystemAtomicComponentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/SystemAtomicComponentTestCase.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/SystemAtomicComponentTestCase.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/SystemAtomicComponentTestCase.java
Tue Jun  6 20:18:22 2006
@@ -18,7 +18,8 @@
     public void testContextCreationAndInit() throws Exception {
         ObjectFactory<Foo> factory = new PojoObjectFactory<Foo>(Foo.class.getConstructor((Class[])
null), null);
         SystemAtomicComponent context = new SystemAtomicComponentImpl("foo", null, null,
Foo.class, factory, false, initInvoker, null, null, null);
-        Foo foo = (Foo) context.createInstance().getInstance();
+        Foo foo = (Foo) context.createInstance();
+        context.init(foo);
         assertNotNull(foo);
         assertTrue(foo.initialized);
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
Tue Jun  6 20:18:22 2006
@@ -50,7 +50,7 @@
      *
      * @throws ObjectCreationException
      */
-    InstanceWrapper createInstance() throws ObjectCreationException;
+    Object createInstance() throws ObjectCreationException;
 
 
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java?rev=412264&r1=412263&r2=412264&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
Tue Jun  6 20:18:22 2006
@@ -51,13 +51,4 @@
      */
     Object getInstance(AtomicComponent component) throws TargetException;
 
-
-    /**
-     * Returns the instance wrapper associated with the current component
-     *
-     * @throws TargetException
-     */
-    InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException;
-
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message