You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2006/08/16 05:25:06 UTC

svn commit: r431787 - in /incubator/tuscany/java/sca/containers/container.spring/src: main/java/org/apache/tuscany/container/spring/impl/ main/java/org/apache/tuscany/container/spring/model/ test/java/org/apache/tuscany/container/spring/integration/

Author: jmarino
Date: Tue Aug 15 20:25:06 2006
New Revision: 431787

URL: http://svn.apache.org/viewvc?rev=431787&view=rev
Log:
add Javadoc

Removed:
    incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringServiceContract.java
Modified:
    incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringComponentTypeLoader.java
    incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringInvoker.java
    incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringComponentType.java
    incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringImplementation.java
    incubator/tuscany/java/sca/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/integration/BootstrapTestCase.java

Modified: incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringComponentTypeLoader.java?rev=431787&r1=431786&r2=431787&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringComponentTypeLoader.java (original)
+++ incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringComponentTypeLoader.java Tue Aug 15 20:25:06 2006
@@ -65,7 +65,8 @@
                      SpringImplementation implementation,
                      DeploymentContext deploymentContext) throws LoaderException {
         if (implementation.getComponentType() != null) {
-            // FIXME hack
+            // FIXME hack since the builder registry loads the implementation type and the Spring implementation loader
+            // needs to as well. The second call is done by the builder registry and we just ignore it.
             return;
         }
         Resource resource = implementation.getApplicationResource();

Modified: incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringInvoker.java?rev=431787&r1=431786&r2=431787&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringInvoker.java (original)
+++ incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/impl/SpringInvoker.java Tue Aug 15 20:25:06 2006
@@ -30,7 +30,8 @@
 import org.springframework.context.ApplicationContext;
 
 /**
- * Dispatches to an operation on a Spring bean
+ * Dispatches to an operation on a Spring bean. Since Spring manages bean lifecycle and scope through resolution in the
+ * target proxy, the invoker can safely cache the target proxy.
  *
  * @version $$Rev$$ $$Date$$
  */

Modified: incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringComponentType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringComponentType.java?rev=431787&r1=431786&r2=431787&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringComponentType.java (original)
+++ incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringComponentType.java Tue Aug 15 20:25:06 2006
@@ -29,6 +29,9 @@
 import org.springframework.context.support.GenericApplicationContext;
 
 /**
+ * Component type information for a Spring composite component implementation type. A component type is associated with
+ * a Spring application context
+ *
  * @version $Rev$ $Date$
  */
 public class SpringComponentType<S extends ServiceDefinition,
@@ -43,22 +46,45 @@
         this.applicationContext = applicationContext;
     }
 
+    /**
+     * Returns the application context for the component type
+     */
     public GenericApplicationContext getApplicationContext() {
         return applicationContext;
     }
 
+    /**
+     * Returns a collection of service types defined by <code>sca:service</code> elements in a Spring configuration.
+     * Service types define beans that can be targets of services defined in the SCDL Spring composite declaration. For
+     * each service type, there must be a corresponding service definition as part of the Spring composite declaration
+     * per the SCA specification.
+     */
     public Map<String, Class<?>> getServiceTypes() {
         return serviceTypes;
     }
 
+    /**
+     * Adds a service type to the component declaration defined by <code>sca:service</code> elements in a Spring
+     * configuration.
+     *
+     * @param name the name of the service
+     * @param type the interface type of the target bean
+     */
     public void addServiceType(String name, Class<?> type) {
         this.serviceTypes.put(name, type);
     }
 
+    /**
+     * Returns true if all beans in the Spring application context may be service targets or false if service types are
+     * defined
+     */
     public boolean isExposeAllBeans() {
         return exposeAllBeans;
     }
 
+    /**
+     * Sets if all beans in the Spring application context may be service targets or false if service types are defined
+     */
     public void setExposeAllBeans(boolean exposeAllBeans) {
         this.exposeAllBeans = exposeAllBeans;
     }

Modified: incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringImplementation.java?rev=431787&r1=431786&r2=431787&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringImplementation.java (original)
+++ incubator/tuscany/java/sca/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/model/SpringImplementation.java Tue Aug 15 20:25:06 2006
@@ -27,13 +27,12 @@
 import org.springframework.core.io.Resource;
 
 /**
+ * Represents a composite whose implementation type is a Spring application context.
+ *
  * @version $$Rev$$ $$Date$$
  */
-public class SpringImplementation extends Implementation<
-    SpringComponentType<
-        BoundServiceDefinition<? extends Binding>,
-        BoundReferenceDefinition<? extends Binding>,
-        ? extends Property>> {
+public class SpringImplementation extends Implementation<SpringComponentType<BoundServiceDefinition<? extends Binding>,
+    BoundReferenceDefinition<? extends Binding>, ? extends Property>> {
 
     private String location;
     private Resource applicationResource;

Modified: incubator/tuscany/java/sca/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/integration/BootstrapTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/integration/BootstrapTestCase.java?rev=431787&r1=431786&r2=431787&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/integration/BootstrapTestCase.java (original)
+++ incubator/tuscany/java/sca/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/integration/BootstrapTestCase.java Tue Aug 15 20:25:06 2006
@@ -10,6 +10,11 @@
 import org.apache.tuscany.test.SCATestCase;
 
 /**
+ * Bootstraps a simple scenario where a service can invoke a Spring bean. This test case is intended to be temporary and
+ * replaced when the SPI test harness is finished.
+ * <p/>
+ * <bold>PLEASE DO NOT EMULATE</bold>
+ *
  * @version $Rev$ $Date$
  */
 public class BootstrapTestCase extends SCATestCase {



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