tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r530466 - in /incubator/tuscany/java/sca/modules: contribution/src/main/java/org/apache/tuscany/contribution/service/ core-spi/src/main/java/org/apache/tuscany/spi/component/ core/src/main/java/org/apache/tuscany/core/component/ core/src/ma...
Date Thu, 19 Apr 2007 15:57:35 GMT
Author: rfeng
Date: Thu Apr 19 08:57:33 2007
New Revision: 530466

URL: http://svn.apache.org/viewvc?view=rev&rev=530466
Log:
Remove unused registration of system components

Modified:
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/contribution/service/ContributionService.java
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/SingletonAtomicComponent.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireImplTestCase.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilder.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/PojoAtomicComponent.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaBuilderPropertyTestCaseFIXME.java

Modified: incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/contribution/service/ContributionService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/contribution/service/ContributionService.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/contribution/service/ContributionService.java
(original)
+++ incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/contribution/service/ContributionService.java
Thu Apr 19 08:57:33 2007
@@ -76,7 +76,7 @@
 
     /**
      * Adds or updates a deployment composite using a supplied composite
-     * ("composite by value" � a data structure, not an existing resource in the
+     * ("composite by value" - a data structure, not an existing resource in the
      * domain) to the contribution identified by a supplied contribution URI.
      * The added or updated deployment composite is given a relative URI that
      * matches the "name" attribute of the composite, with a ".composite"

Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
(original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/AtomicComponent.java
Thu Apr 19 08:57:33 2007
@@ -74,31 +74,4 @@
      */
     ObjectFactory<T> createObjectFactory();
 
-    /**
-     * Creates a new implementation instance, generally used as a callback by a {@link
-     * org.apache.tuscany.spi.component.ScopeContainer}.
-     *
-     * @return the instance
-     * @throws ObjectCreationException
-     */
-    @Deprecated
-    Object createInstance() throws ObjectCreationException;
-
-    /**
-     * Removes an implementation instance associated with the current invocation context.
-     *
-     * @throws ComponentException
-     */
-    @Deprecated
-    void removeInstance() throws ComponentException;
-
-    /**
-     * Returns the target instance associated with the component. A target instance is the
actual object a request is
-     * dispatched to sans wire chain.
-     *
-     * @throws TargetResolutionException
-     */
-    @Deprecated
-    Object getTargetInstance() throws TargetResolutionException;
-
 }

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/SingletonAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/SingletonAtomicComponent.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/SingletonAtomicComponent.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/SingletonAtomicComponent.java
Thu Apr 19 08:57:33 2007
@@ -23,6 +23,7 @@
 import java.util.List;
 
 import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.core.component.scope.InstanceWrapperBase;
 import org.apache.tuscany.core.injection.SingletonObjectFactory;
 import org.apache.tuscany.interfacedef.Operation;
 import org.apache.tuscany.spi.ObjectCreationException;
@@ -94,7 +95,7 @@
     }
 
     public InstanceWrapper<T> createInstanceWrapper() throws ObjectCreationException
{
-        throw new UnsupportedOperationException();
+        return new InstanceWrapperBase<T>(instance);
     }
 
     public ObjectFactory<T> createObjectFactory() {

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
Thu Apr 19 08:57:33 2007
@@ -18,10 +18,6 @@
  */
 package org.apache.tuscany.core.runtime;
 
-import static org.apache.tuscany.spi.bootstrap.ComponentNames.TUSCANY_DEPLOYER;
-import static org.apache.tuscany.spi.bootstrap.ComponentNames.TUSCANY_SYSTEM;
-import static org.apache.tuscany.spi.bootstrap.ComponentNames.TUSCANY_SYSTEM_ROOT;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -45,7 +41,6 @@
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
 import org.apache.tuscany.core.component.ComponentManagerImpl;
-import org.apache.tuscany.core.component.WorkContextImpl;
 import org.apache.tuscany.core.monitor.NullMonitorFactory;
 import org.apache.tuscany.core.services.classloading.ClassLoaderRegistryImpl;
 import org.apache.tuscany.core.util.IOHelper;
@@ -54,18 +49,15 @@
 import org.apache.tuscany.host.MonitorFactory;
 import org.apache.tuscany.host.RuntimeInfo;
 import org.apache.tuscany.host.management.ManagementService;
-import org.apache.tuscany.host.monitor.FormatterRegistry;
 import org.apache.tuscany.host.runtime.InitializationException;
 import org.apache.tuscany.host.runtime.TuscanyRuntime;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
 import org.apache.tuscany.interfacedef.java.JavaInterfaceContract;
 import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
-import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.Component;
 import org.apache.tuscany.spi.component.ComponentManager;
 import org.apache.tuscany.spi.component.RegistrationException;
 import org.apache.tuscany.spi.component.ScopeRegistry;
-import org.apache.tuscany.spi.component.TargetResolutionException;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.deployer.Deployer;
 import org.apache.tuscany.spi.services.classloading.ClassLoaderRegistry;
@@ -79,20 +71,6 @@
  * @version $Rev$ $Date$
  */
 public abstract class AbstractRuntime<I extends RuntimeInfo> implements TuscanyRuntime<I>
{
-    private static final URI MONITOR_URI = TUSCANY_SYSTEM_ROOT.resolve("MonitorFactory");
-
-    private static final URI COMPONENT_MGR_URI = TUSCANY_SYSTEM_ROOT.resolve("ComponentManager");
-
-    private static final URI SCOPE_REGISTRY_URI = TUSCANY_SYSTEM_ROOT.resolve("ScopeRegistry");
-
-    private static final URI WORK_CONTEXT_URI = TUSCANY_SYSTEM.resolve("WorkContext");
-    
-    private static final URI WORK_SCHEDULER_URI = TUSCANY_SYSTEM.resolve("WorkScheduler");
-
-    private static final URI RUNTIME_INFO_URI = TUSCANY_SYSTEM_ROOT.resolve("RuntimeInfo");
-
-    private static final URI CLASSLOADER_REGISTRY_URI = TUSCANY_SYSTEM_ROOT.resolve("ClassLoaderRegistry");
-
     private static final URI HOST_CLASSLOADER_ID = URI.create("sca://./hostClassLoader");
 
     private static final URI BOOT_CLASSLOADER_ID = URI.create("sca://./bootClassLoader");
@@ -215,10 +193,9 @@
 
         extensionRegistry.addExtensionPoint(ContributionService.class, contributionService);
 
-        registerSystemComponent(TUSCANY_DEPLOYER, Deployer.class, deployer);
-        registerSystemComponent(WORK_CONTEXT_URI, WorkContext.class, new WorkContextImpl());
+        extensionRegistry.addExtensionPoint(Deployer.class, deployer);
         WorkManager workManager = new ThreadPoolWorkManager(10);
-        registerSystemComponent(WORK_SCHEDULER_URI, WorkScheduler.class, new Jsr237WorkScheduler(workManager));
//lresende
+        extensionRegistry.addExtensionPoint(WorkScheduler.class, new Jsr237WorkScheduler(workManager));
//lresende
 
         this.scopeRegistry = bootstrapper.getScopeRegistry();
 
@@ -270,33 +247,16 @@
 
     protected void registerBaselineSystemComponents() throws InitializationException {
         // register the RuntimeInfo provided by the host
-        registerSystemComponent(RUNTIME_INFO_URI, runtimeInfoType, runtimeInfo);
-
-        // register the MonitorFactory provided by the host
-        List<Class<?>> monitorServices = new ArrayList<Class<?>>();
-        monitorServices.add(MonitorFactory.class);
-        monitorServices.add(FormatterRegistry.class);
-        registerSystemComponent(MONITOR_URI, monitorServices, getMonitorFactory());
+        extensionRegistry.addExtensionPoint(runtimeInfoType, runtimeInfo);
 
         // register the ClassLoaderRegistry
-        registerSystemComponent(CLASSLOADER_REGISTRY_URI, ClassLoaderRegistry.class, classLoaderRegistry);
+        extensionRegistry.addExtensionPoint(ClassLoaderRegistry.class, classLoaderRegistry);
 
         // register the ComponentManager to that the fabric can wire to it
-        registerSystemComponent(COMPONENT_MGR_URI, ComponentManager.class, componentManager);
+        extensionRegistry.addExtensionPoint(ComponentManager.class, componentManager);
 
         // register the ScopeRegistry
-        registerSystemComponent(SCOPE_REGISTRY_URI, ScopeRegistry.class, scopeRegistry);
-    }
-
-    protected <S, I extends S> void registerSystemComponent(URI uri, Class<S>
type, I component)
-        throws InitializationException {
-        try {
-            ComponentService contract = createContract(type);
-            componentManager.registerJavaObject(uri, contract, component);
-            extensionRegistry.addExtensionPoint(type, component);
-        } catch (RegistrationException e) {
-            throw new InitializationException(e);
-        }
+        extensionRegistry.addExtensionPoint(ScopeRegistry.class, scopeRegistry);
     }
 
     private <S> ComponentService createContract(Class<S> type) {
@@ -332,21 +292,11 @@
     }
 
     protected WorkContext getWorkContext() {
-        try {
-            AtomicComponent component = (AtomicComponent)getComponentManager().getComponent(WORK_CONTEXT_URI);
-            return (WorkContext)component.getTargetInstance();
-        } catch (TargetResolutionException e) {
-            throw new AssertionError(e);
-        }
+        return extensionRegistry.getExtensionPoint(WorkContext.class);
     }
 
     protected Deployer getDeployer() {
-        try {
-            AtomicComponent component = (AtomicComponent)getComponentManager().getComponent(TUSCANY_DEPLOYER);
-            return (Deployer)component.getTargetInstance();
-        } catch (TargetResolutionException e) {
-            throw new AssertionError(e);
-        }
+        return extensionRegistry.getExtensionPoint(Deployer.class);
     }
 
     /**

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java
Thu Apr 19 08:57:33 2007
@@ -102,7 +102,7 @@
     public Deployer createDeployer(ExtensionPointRegistry extensionRegistry) {
         ScopeRegistry scopeRegistry = getScopeRegistry();
         BuilderRegistry builder = createBuilder(scopeRegistry);
-        WorkContext workContext = new WorkContextImpl();
+        WorkContext workContext = extensionRegistry.getExtensionPoint(WorkContext.class);
         WorkManager workManager = new ThreadPoolWorkManager(10);
         WorkScheduler workScheduler = new Jsr237WorkScheduler(workManager);
         DeployerImpl deployer = new DeployerImpl(xmlFactory, builder, componentManager, workScheduler,
workContext);

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/wire/WireImpl.java
Thu Apr 19 08:57:33 2007
@@ -21,14 +21,11 @@
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import javax.xml.namespace.QName;
 
 import org.apache.tuscany.interfacedef.InterfaceContract;
-import org.apache.tuscany.interfacedef.Operation;
 import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.TargetResolutionException;
 import org.apache.tuscany.spi.wire.InvocationChain;
@@ -115,7 +112,7 @@
         if (target == null) {
             return null;
         }
-        return target.getTargetInstance();
+        return target.createObjectFactory().getInstance();
     }
 
     public void setTarget(AtomicComponent target) {

Modified: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java
Thu Apr 19 08:57:33 2007
@@ -38,7 +38,7 @@
  */
 public class JavaObjectRegistrationTestCase extends TestCase {
     private ComponentManager componentManager;
-    
+
     private <S> ComponentService createContract(Class<S> type) {
         AssemblyFactory factory = new DefaultAssemblyFactory();
         ComponentService contract = factory.createComponentService();
@@ -49,16 +49,17 @@
         javaInterfaceContract.setInterface(javaInterface);
         return contract;
     }
-    
+
     public void testRegistration() throws Exception {
         MockComponent instance = new MockComponent();
         URI uri = URI.create("foo");
-        
+
         ComponentService contract = createContract(MockComponent.class);
         componentManager.registerJavaObject(uri, contract, instance);
         Component component = componentManager.getComponent(URI.create("foo"));
         assertTrue(component instanceof AtomicComponent);
-        MockComponent resolvedInstance = (MockComponent) ((AtomicComponent) component).getTargetInstance();
+        MockComponent resolvedInstance = (MockComponent)((AtomicComponent)component).createObjectFactory()
+            .getInstance();
         assertSame(instance, resolvedInstance);
     }
 

Modified: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireImplTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireImplTestCase.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireImplTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireImplTestCase.java
Thu Apr 19 08:57:33 2007
@@ -18,10 +18,11 @@
  */
 package org.apache.tuscany.core.wire;
 
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.injection.SingletonObjectFactory;
 import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.wire.Wire;
-
-import junit.framework.TestCase;
 import org.easymock.EasyMock;
 
 /**
@@ -30,8 +31,8 @@
 public class WireImplTestCase extends TestCase {
 
     /**
-     * Tests that the target wire returns null if there is no connected wire. This behavior
is needed for optional
-     * autowires.
+     * Tests that the target wire returns null if there is no connected wire.
+     * This behavior is needed for optional autowires.
      */
     public void testGetNonExistentTarget() throws Exception {
         Wire wire = new WireImpl();
@@ -41,7 +42,7 @@
     public void testTargetInstance() throws Exception {
         Wire wire = new WireImpl();
         AtomicComponent component = EasyMock.createMock(AtomicComponent.class);
-        EasyMock.expect(component.getTargetInstance()).andReturn(new Object());
+        EasyMock.expect(component.createObjectFactory()).andReturn(new SingletonObjectFactory<Object>(new
Object()));
         EasyMock.replay(component);
         wire.setTarget(component);
         assertNotNull(wire.getTargetInstance());

Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java
Thu Apr 19 08:57:33 2007
@@ -140,6 +140,7 @@
         // Create a work context
         //WorkContext workContext = new SimpleWorkContext();
         WorkContext workContext = new WorkContextImpl();
+        extensionRegistry.addExtensionPoint(WorkContext.class, workContext);
         workContext.setIdentifier(Scope.COMPOSITE, DEFAULT_COMPOSITE);
         WorkContextTunnel.setThreadWorkContext(workContext);
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilder.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilder.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilder.java
Thu Apr 19 08:57:33 2007
@@ -82,16 +82,15 @@
         JavaAtomicComponent component) {
         for (Resource resource : componentType.getResources().values()) {
             String name = resource.getName();
-            ObjectFactory<?> objectFactory = null;
-            if (objectFactory == null) {
-                Class<?> type = resource.getElement().getType();
-                if (ComponentContext.class.equals(type)) {
-                    objectFactory = new PojoComponentContextFactory(component);
-                } else {
-                    boolean optional = resource.isOptional();
-                    String mappedName = resource.getMappedName();
-                    objectFactory = createResourceObjectFactory(type, mappedName, optional,
host);
-                }
+            
+            ObjectFactory<?> objectFactory = (ObjectFactory<?>) component.getConfiguration().getFactories().get(resource.getElement());
+            Class<?> type = resource.getElement().getType();
+            if (ComponentContext.class.equals(type)) {
+                objectFactory = new PojoComponentContextFactory(component);
+            } else {
+                boolean optional = resource.isOptional();
+                String mappedName = resource.getMappedName();
+                objectFactory = createResourceObjectFactory(type, mappedName, optional, host);
             }
             component.addResourceFactory(name, objectFactory);
         }

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/PojoAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/PojoAtomicComponent.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/PojoAtomicComponent.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/PojoAtomicComponent.java
Thu Apr 19 08:57:33 2007
@@ -415,4 +415,8 @@
         return createInstanceWrapper().getInstance();
     }
 
+    public PojoConfiguration<?> getConfiguration() {
+        return configuration;
+    }
+
 }

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaBuilderPropertyTestCaseFIXME.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaBuilderPropertyTestCaseFIXME.java?view=diff&rev=530466&r1=530465&r2=530466
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaBuilderPropertyTestCaseFIXME.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaBuilderPropertyTestCaseFIXME.java
Thu Apr 19 08:57:33 2007
@@ -73,7 +73,7 @@
         propertyValue.setName(property.getName());
         definition.getProperties().add(propertyValue);
         AtomicComponent component = builder.build(definition, deploymentContext);
-        JavaBuilderPropertyTestCaseFIXME.Foo foo = (JavaBuilderPropertyTestCaseFIXME.Foo)component.createInstance();
+        JavaBuilderPropertyTestCaseFIXME.Foo foo = (JavaBuilderPropertyTestCaseFIXME.Foo)component.createObjectFactory().getInstance();
         assertEquals("foo", foo.getTest());
     }
 
@@ -101,7 +101,7 @@
         propertyValue.setName(property.getName());
         definition.getProperties().add(propertyValue);
         AtomicComponent component = builder.build(definition, deploymentContext);
-        FooInt foo = (FooInt)component.createInstance();
+        FooInt foo = (FooInt)component.createObjectFactory().getInstance();
         assertEquals(1, foo.getTest());
     }
 



---------------------------------------------------------------------
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