tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r830060 - in /tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring: ./ introspect/ invocation/ xml/
Date Tue, 27 Oct 2009 05:26:34 GMT
Author: rfeng
Date: Tue Oct 27 05:26:34 2009
New Revision: 830060

URL: http://svn.apache.org/viewvc?rev=830060&view=rev
Log:
Revert the wrong change

Modified:
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java
  (contents, props changed)
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java
  (contents, props changed)
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProvider.java
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProviderFactory.java
    tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
Tue Oct 27 05:26:34 2009
@@ -44,7 +44,7 @@
     // The location attribute which points to the Spring application-context XML file
     private String location;
     // The application-context file as a Spring Resource
-    private URL resource;
+    private List<URL> resource;
     private ComponentType componentType;
     // Mapping of Services to Beans
     private Hashtable<String, SpringBeanElement> serviceMap;
@@ -78,11 +78,11 @@
         return;
     }
 
-    public void setResource(URL resource) {
+    public void setResource(List<URL> resource) {
         this.resource = resource;
     }
 
-    public URL getResource() {
+    public List<URL> getResource() {
         return resource;
     }
 

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
Tue Oct 27 05:26:34 2009
@@ -90,22 +90,19 @@
     private AssemblyFactory assemblyFactory;
     private JavaInterfaceFactory javaFactory;
     private PolicyFactory policyFactory;
-    private boolean isMultipleContextSupported;
 
     private SpringBeanIntrospector beanIntrospector;
 
     public SpringXMLComponentTypeLoader(ModelFactoryExtensionPoint factories,
                                         AssemblyFactory assemblyFactory,
                                         JavaInterfaceFactory javaFactory,
-                                        PolicyFactory policyFactory,
-                                        boolean multipleContextSupport) {
+                                        PolicyFactory policyFactory) {
         super();
         this.assemblyFactory = assemblyFactory;
         this.javaFactory = javaFactory;
         this.policyFactory = policyFactory;
         this.contributionFactory = factories.getFactory(ContributionFactory.class);
         this.xmlInputFactory = factories.getFactory(XMLInputFactory.class);
-        this.isMultipleContextSupported = multipleContextSupport;
     }
 
     protected Class<SpringImplementation> getImplementationClass() {
@@ -159,23 +156,25 @@
         List<SpringSCAPropertyElement> scaproperties = new ArrayList<SpringSCAPropertyElement>();
 
         URL resource;
-
+        List<URL> contextResources = new ArrayList<URL>();
         String contextPath = implementation.getLocation();
 
         try {
             resource = resolveLocation(resolver, contextPath);
-            resource = getApplicationContextResource(resource);
+            contextResources = getApplicationContextResource(resource);
 
             implementation.setClassLoader(new ContextClassLoader(resolver));
-            implementation.setResource(resource);
+            implementation.setResource(contextResources);
             // The URI is used to uniquely identify the Implementation
             implementation.setURI(resource.toString());
-            reader = xmlInputFactory.createXMLStreamReader(resource.openStream());
-
-            // System.out.println("Spring TypeLoader - starting to read context file");
-            readContextDefinition(resolver, reader, contextPath, beans, services, references,
scaproperties);
             
-            reader.close();
+            for (URL contextResource : contextResources) {
+            	reader = xmlInputFactory.createXMLStreamReader(contextResource.openStream());
+            	// System.out.println("Spring TypeLoader - starting to read context file");
+            	readContextDefinition(resolver, reader, contextPath, beans, services, references,
scaproperties);
+            	
+            	reader.close();
+            }
 
         } catch (IOException e) {
             throw new ContributionReadException(e);
@@ -219,7 +218,7 @@
     private XMLStreamReader getApplicationContextReader(ModelResolver resolver, String location)
throws ContributionReadException {
 
         try {
-            URL resource = getApplicationContextResource(resolveLocation(resolver, location));
+            URL resource = getApplicationContextResource(resolveLocation(resolver, location)).get(0);
             XMLStreamReader reader =
             	xmlInputFactory.createXMLStreamReader(resource.openStream());
             return reader;
@@ -342,13 +341,6 @@
                             if (reader.getAttributeValue(null, "value") != null) {
                             	String value = reader.getAttributeValue(null, "value");
                             	constructorArg.addValue(value);
-                            	if ((isMultipleContextSupported) && (value.indexOf(".xml")
!= -1)) {
-                                    if (bean.getClassName().indexOf(".ClassPathXmlApplicationContext")
!= -1) {
-                                        XMLStreamReader creader = getApplicationContextReader(resolver,
value);
-                                        // Read the context definition for the constructor-arg
resources
-                                        readContextDefinition(resolver, creader, contextPath,
beans, services, references, scaproperties);
-                                    }
-                                }
                             }
                             bean.addCustructorArgs(constructorArg);
                         } else if (SpringImplementationConstants.REF_ELEMENT.equals(qname))
{
@@ -360,17 +352,8 @@
                         } else if (SpringImplementationConstants.VALUE_ELEMENT.equals(qname))
{
                             String value = reader.getElementText();
                             // Check if the parent element is a constructor-arg
-                            if (constructorArg != null) {
+                            if (constructorArg != null)
                             	constructorArg.addValue(value);
-                                // Identify the XML resource specified for the constructor-arg
element
-                                if ((isMultipleContextSupported) && (value.indexOf(".xml")
!= -1)) {
-                                    if (bean.getClassName().indexOf(".ClassPathXmlApplicationContext")
!= -1) {
-                                        XMLStreamReader creader = getApplicationContextReader(resolver,
value);
-                                        // Read the context definition for the constructor-arg
resources
-                                        readContextDefinition(resolver, creader, contextPath,
beans, services, references, scaproperties);
-                                    }
-                                }
-                            }
                         } // end if
                         break;
                     case END_ELEMENT:
@@ -572,9 +555,9 @@
                     		Class<?> interfaze = resolveClass(resolver, paramType);
                     		// Create a component type reference/property if the constructor-arg
element has a
                             // type attribute OR index attribute declared...
-                    		if ((conArgElement.getType() != null && paramType.equals(conArgElement.getType()))
||
+                    	    if ((conArgElement.getType() != null && paramType.equals(conArgElement.getType()))
||
                     		    (conArgElement.getIndex() != -1 && (conArgElement.getIndex()
== parameter.getIndex())))
-                    		{
+                    		{                    		
                     			if (parameter.getClassifer().getName().equals("org.osoa.sca.annotations.Reference"))
{
                     				Reference theReference = createReference(interfaze, conArgElement.getRef());
                     				componentType.getReferences().add(theReference);
@@ -670,19 +653,19 @@
      * @param locationAttr - the location attribute from the <implementation.spring../>
element
      * @param cl - the ClassLoader for the Spring implementation
      */
-    protected URL getApplicationContextResource(URL url)
+    protected List<URL> getApplicationContextResource(URL url)
         throws ContributionReadException {
         File manifestFile = null;
         File appXmlFile;
         File locationFile = null;
+        List<URL> appCtxResources = new ArrayList<URL>();
 
         if (url != null) {
             String path = url.getPath();
             locationFile = new File(path);
         } else {
-            throw new ContributionReadException(
-                    "SpringXMLLoader getApplicationContextResource: " + "unable to find resource
file "
-                        + url);
+            throw new ContributionReadException("SpringXMLComponentTypeLoader getApplicationContextResource:
" 
+            		            + "unable to find resource file " + url);
         }
 
         if (locationFile.isDirectory()) {
@@ -692,21 +675,26 @@
                     Manifest mf = new Manifest(new FileInputStream(manifestFile));
                     Attributes mainAttrs = mf.getMainAttributes();
                     String appCtxPath = mainAttrs.getValue("Spring-Context");
-                    if (appCtxPath != null) {
-                        appXmlFile = new File(locationFile, appCtxPath);
-                        if (appXmlFile.exists()) {
-                            return appXmlFile.toURL();
-                        }
+                    if (appCtxPath != null) {                    	
+	            		String[] cxtPaths = appCtxPath.split(";");
+	            		for (String path : cxtPaths) {
+	            			appXmlFile = new File(locationFile, path);
+	            			if (appXmlFile.exists()) {
+	            				appCtxResources.add(appXmlFile.toURI().toURL());
+	            			}
+	            		}
+	            		return appCtxResources;
                     }
                 }
                 // no manifest-specified Spring context, use default
                 appXmlFile = new File(locationFile, "META-INF" + File.separator + "spring"
                                                         + File.separator + SpringImplementationConstants.APPLICATION_CONTEXT);
                 if (appXmlFile.exists()) {
-                    return appXmlFile.toURL();
+                	appCtxResources.add(appXmlFile.toURI().toURL());
+                	return appCtxResources;
                 }
             } catch (IOException e) {
-                throw new ContributionReadException("Error reading manifest inside the folder:
", e);
+                throw new ContributionReadException("Error reading manifest " + manifestFile);
             }
         } else {
         	if (locationFile.isFile() && locationFile.getName().endsWith(".jar")) {
@@ -718,18 +706,22 @@
                         Attributes mainAttrs = mf.getMainAttributes();
                         String appCtxPath = mainAttrs.getValue("Spring-Context");
                         if (appCtxPath != null) {
-                            je = jf.getJarEntry(appCtxPath);
-                            if (je != null) {
-                                // TODO return a Spring specific Resource type for jars
-                                return new URL("jar:" + locationFile.toURI().toURL() + "!/"
+ appCtxPath);
-                            }
+                        	String[] cxtPaths = appCtxPath.split(";");
+    	            		for (String path : cxtPaths) {
+    	            			je = jf.getJarEntry(path);
+    	            			if (je != null) {
+    	            				appCtxResources.add(new URL("jar:" + locationFile.toURI().toURL() +
"!/" + appCtxPath));
+    	            			}
+    	            		}
+    	            		return appCtxResources;
                         }
                     }
                     // Look for the default applicaiton-context.xml file, when MANIFEST.MF
is absent.
                     je = jf.getJarEntry("META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT);
                     if (je != null) {
-                        return new URL("jar:" + locationFile.toURI().toURL() + "!/" +
-                        		"META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT);
+                    	appCtxResources.add(new URL("jar:" + locationFile.toURI().toURL() +
"!/" +
+                        		"META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT));
+                    	return appCtxResources;                        
                     }
                 } catch (IOException e) {
                     // TODO: create a more appropriate exception type
@@ -739,13 +731,14 @@
         	}
         	else {
         		if (locationFile.getName().endsWith(".xml")) {
-        			return url;
+        			appCtxResources.add(url);
+                	return appCtxResources;
         		}
         		else {
         			// Deal with the directory inside a jar file, in case the contribution itself
is a JAR file.
         			try {
 	        			if (locationFile.getPath().indexOf(".jar") > 0) {
-	        				String jarPath = url.getPath().substring(5, url.getPath().indexOf("!"));
+	        				String jarPath = url.getPath().substring(6, url.getPath().indexOf("!"));
 	        				JarFile jf = new JarFile(jarPath);
 	        				JarEntry je = jf.getJarEntry(url.getPath().substring(url.getPath().indexOf("!/")+2)
 	        												+ "/" + "META-INF" + "/" + "MANIFEST.MF");
@@ -754,29 +747,34 @@
 	        					Attributes mainAttrs = mf.getMainAttributes();
 	                            String appCtxPath = mainAttrs.getValue("Spring-Context");
 	                            if (appCtxPath != null) {
-	                                je = jf.getJarEntry(url.getPath().substring(url.getPath().indexOf("!/")+2)
+ "/" + appCtxPath);
-	                                if (je != null) {
-	                                    return new URL("jar:" + url.getPath() + "/" + appCtxPath);
-	                                }
+	                            	String[] cxtPaths = appCtxPath.split(";");
+	        	            		for (String path : cxtPaths) {
+		                                je = jf.getJarEntry(url.getPath().substring(url.getPath().indexOf("!/")+2)
+ "/" + path);
+		                                if (je != null) {
+		                                	appCtxResources.add(new URL("jar:" + url.getPath() + "/"
+ path));
+		    	                        	return appCtxResources;
+		                                }
+	        	            		}
 	                            }
 	        				}
 	        			    // Look for the default applicaiton-context.xml file, when MANIFEST.MF is
absent.
         			    	je = jf.getJarEntry(url.getPath().substring(url.getPath().indexOf("!/")+2)
+ "/" + 
                         			"META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT);
                             if (je != null) {
-                                return new URL("jar:" + url.getPath() + "/" + 
-                                	"META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT);
+                            	appCtxResources.add(new URL("jar:" + url.getPath() + "/" + 
+                                    	"META-INF" + "/" + "spring" + "/" + SpringImplementationConstants.APPLICATION_CONTEXT));
+	                        	return appCtxResources;
                             }
 	        			}
             		} catch (IOException e) {
-            			throw new ContributionReadException("Error reading manifest inside the jar
folder: ", e);
+                        throw new ContributionReadException("Error reading manifest " + manifestFile);
                     }
         		}
         	}
         }
 
-        throw new ContributionReadException("SpringXMLLoader getApplicationContextResource:
"
-                                        + "META-INF/spring/" + SpringImplementationConstants.APPLICATION_CONTEXT
+ " not found");
+        throw new ContributionReadException("SpringXMLComponentTypeLoader getApplicationContextResource:
" 
+        		                            + "unable to read resource file " + url);
     } // end method getApplicationContextResource
 
     /**

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java
Tue Oct 27 05:26:34 2009
@@ -4,8 +4,6 @@
 	
 	boolean isAnnotationSupported();
 	
-	boolean isMultipleContextSupported();
-	
 	String getSupportedVersion();
 
 }

Propchange: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/ConfigurationPropertiesExtensionPoint.java
            ('svn:mergeinfo' removed)

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java
Tue Oct 27 05:26:34 2009
@@ -8,17 +8,11 @@
 	}
 	
 	// By default SCA annotations for implementation.spring
-	// will be supproted for Tuscany.
+	// will be supproted.
 	public boolean isAnnotationSupported() {
 		return true;
 	}
 	
-	// By default multiple application context implementation.spring
-	// will be supproted for Tuscany.
-	public boolean isMultipleContextSupported() {
-		return true;
-	}
-	
 	// By defauly all the Spring version are supported for 
 	// Tuscany.
 	public String getSupportedVersion() {

Propchange: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/DefaultConfigurationPropertiesExtensionPoint.java
            ('svn:mergeinfo' removed)

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java
Tue Oct 27 05:26:34 2009
@@ -22,7 +22,7 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.net.URL;
+import java.util.List;
 
 import org.apache.tuscany.sca.core.invocation.ProxyFactory;
 import org.apache.tuscany.sca.implementation.java.injection.JavaPropertyValueObjectFactory;
@@ -47,10 +47,9 @@
                                ProxyFactory proxyService,
                                JavaPropertyValueObjectFactory propertyValueObjectFactory,
                                boolean annotationSupport,
-                               String versionSupported,
-                               boolean multipleContextSupport) {
+                               String versionSupported) {
 
-        initTie(component, implementation, propertyValueObjectFactory, annotationSupport,
versionSupported, multipleContextSupport);        
+        initTie(component, implementation, propertyValueObjectFactory, annotationSupport,
versionSupported);        
 
     }
 
@@ -58,8 +57,7 @@
                          SpringImplementation implementation,
                          JavaPropertyValueObjectFactory propertyValueObjectFactory,
                          boolean annotationSupport,
-                         String versionSupported,
-                         boolean multipleContextSupport) {
+                         String versionSupported) {
 
         // TODO: what class loader to use?
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -71,8 +69,8 @@
             Object stub = stubConstructor.newInstance(new SpringImplementationTie(implementation,
component, propertyValueObjectFactory));
 
             Class<?> tieClass = Class.forName("org.apache.tuscany.sca.implementation.spring.runtime.context.SpringContextTie",
true, cl);
-            Constructor<?> tieConstructor = tieClass.getConstructor(new Class<?>[]{stubClass,
URL.class, boolean.class, String.class, boolean.class});
-            this.tie = tieConstructor.newInstance(stub, implementation.getResource(), annotationSupport,
versionSupported, multipleContextSupport);
+            Constructor<?> tieConstructor = tieClass.getConstructor(new Class<?>[]{stubClass,
List.class, boolean.class, String.class});
+            this.tie = tieConstructor.newInstance(stub, implementation.getResource(), annotationSupport,
versionSupported);
             
             this.startMethod = tieClass.getMethod("start");
             this.closeMethod = tieClass.getMethod("close");

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProvider.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProvider.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProvider.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProvider.java
Tue Oct 27 05:26:34 2009
@@ -52,14 +52,13 @@
                                         ProxyFactory proxyService,
                                         JavaPropertyValueObjectFactory propertyValueObjectFactory,
                                         boolean annotationSupport,
-                                        String versionSupported,
-                                        boolean multipleContextSupport) {
+                                        String versionSupported) {
         super();
         this.implementation = implementation;
         this.component = component;
         this.propertyValueObjectFactory = propertyValueObjectFactory;
 
-        springContext = new SpringContextStub(component, implementation, proxyService, propertyValueObjectFactory,
annotationSupport, versionSupported, multipleContextSupport);        
+        springContext = new SpringContextStub(component, implementation, proxyService, propertyValueObjectFactory,
annotationSupport, versionSupported);        
         
     } // end constructor
 

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProviderFactory.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProviderFactory.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationProviderFactory.java
Tue Oct 27 05:26:34 2009
@@ -41,7 +41,6 @@
     private ConfigurationPropertiesExtensionPoint configProperties;
     private boolean annotationSupport;
     private String versionSupported;
-    private boolean multipleContextSupport;
 
     /**
      * Simple constructor
@@ -59,7 +58,6 @@
         }
         annotationSupport = configProperties.isAnnotationSupported();
         versionSupported = configProperties.getSupportedVersion();
-        multipleContextSupport = configProperties.isMultipleContextSupported();
         
         // TODO: could the runtime have a default PropertyValueObjectFactory?
         propertyFactory = new JavaPropertyValueObjectFactory(new MediatorImpl(extensionPoints));
@@ -79,8 +77,7 @@
                                                 proxyFactory, 
                                                 propertyFactory,
                                                 annotationSupport,
-                                                versionSupported,
-                                                multipleContextSupport);
+                                                versionSupported);
     }
 
     /**

Modified: tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java?rev=830060&r1=830059&r2=830060&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
Tue Oct 27 05:26:34 2009
@@ -39,13 +39,11 @@
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
 import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
 import org.apache.tuscany.sca.implementation.spring.introspect.SpringXMLComponentTypeLoader;
-import org.apache.tuscany.sca.implementation.spring.invocation.ConfigurationPropertiesExtensionPoint;
-import org.apache.tuscany.sca.implementation.spring.invocation.DefaultConfigurationPropertiesExtensionPoint;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.Problem;
 import org.apache.tuscany.sca.monitor.Problem.Severity;
-import org.apache.tuscany.sca.monitor.impl.ProblemImpl;
+import org.apache.tuscany.sca.monitor.impl.ProblemImpl;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 
 /**
@@ -65,11 +63,9 @@
     private JavaInterfaceFactory javaFactory;
     private PolicyFactory policyFactory;
     private PolicyAttachPointProcessor policyProcessor;
-    private ConfigurationPropertiesExtensionPoint configProperties;
     private Monitor monitor;
-    
+
     private ModelFactoryExtensionPoint factories;
-    private boolean multipleContextSupport;
 
     public SpringImplementationProcessor(ExtensionPointRegistry extensionPoints, Monitor
monitor) {
         this.factories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
   	
@@ -77,12 +73,6 @@
         this.javaFactory = factories.getFactory(JavaInterfaceFactory.class);
         this.policyFactory = factories.getFactory(PolicyFactory.class);
         this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
-                
-        this.configProperties = extensionPoints.getExtensionPoint(ConfigurationPropertiesExtensionPoint.class);
-        if (configProperties == null) {
-        	configProperties = new DefaultConfigurationPropertiesExtensionPoint();
-        }        
-        this.multipleContextSupport = configProperties.isMultipleContextSupported();
         this.monitor = monitor;
     }
 
@@ -207,7 +197,7 @@
 
         /* Load the Spring component type by reading the Spring application context */
         SpringXMLComponentTypeLoader springLoader =
-            new SpringXMLComponentTypeLoader(factories, assemblyFactory, javaFactory, policyFactory,
multipleContextSupport);
+            new SpringXMLComponentTypeLoader(factories, assemblyFactory, javaFactory, policyFactory);
         try {
             // Load the Spring Implementation information from its application context file...
             springLoader.load(springImplementation, resolver);



Mime
View raw message