Author: slaws
Date: Thu May 28 17:59:27 2009
New Revision: 779701

URL: http://svn.apache.org/viewvc?rev=779701&view=rev
Log:
TUSCANY-3052 - Add module info object to the EJB implementation generated model 
object. Add in the web implementation generated model object. 

Added:
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
   (with props)
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
   (with props)
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
   (with props)
Modified:
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java
    
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
    
tuscany/branches/sca-java-1.x/modules/implementation-jee/src/main/java/org/apache/tuscany/sca/implementation/jee/xml/JEEImplementationProcessor.java

Modified: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java
 Thu May 28 17:59:27 2009
@@ -23,22 +23,21 @@
 
 
 /**
- * The model representing an EJB implementation in an SCA assembly model.
- *
- * @version $Rev$ $Date$
+ * The model representing an EJB implementation in an SCA assembly model when 
the 
+ * EJB implementation has been generated by introspecting a non-enhanced EAR
  */
 public interface EJBImplementationGenerated extends Implementation {
     
     /**
-     * Returns the EJB link URI.
-     * @return the EJB link URI
+     * Return the EjbInfo which generated this EJB component implementation 
+     * @return
      */
-    String getEJBLink();
+    EjbInfo getEJBInfo();
     
     /**
-     * Sets the EJB link URI.
-     * @param ejbLink the EJB link URI
+     * Set the EjbInfo which generated this EJB component implementation 
+     * @param ejbInfo
      */
-    void setEJBLink(String ejbLink);
+    void setEJBInfo(EjbInfo ejbInfo);
 
 }

Added: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java?rev=779701&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
 Thu May 28 17:59:27 2009
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on 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.sca.contribution.jee;
+
+import org.apache.tuscany.sca.assembly.Implementation;
+
+
+
+/**
+ * The model representing a WEB implementation in an SCA assembly model when 
the 
+ * WEB implementation has been generated by introspecting a non-enhanced EAR
+ */
+public interface WebImplementationGenerated extends Implementation {
+    
+    /**
+     * Return the WebModuleInfo which generated this Web component 
implementation 
+     * @return
+     */
+    WebModuleInfo getWebInfo();
+    
+    /**
+     * Set the WebModuleInfo which generated this Web component implementation 
+     * @param webInfo
+     */
+    void setWebInfo(WebModuleInfo webInfo);
+
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebImplementationGenerated.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java
 Thu May 28 17:59:27 2009
@@ -18,25 +18,18 @@
  */
 package org.apache.tuscany.sca.contribution.jee.impl;
 
-import org.apache.tuscany.sca.assembly.Component;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.builder.ComponentPreProcessor;
 import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
 import org.apache.tuscany.sca.contribution.jee.EJBImplementationGenerated;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
+import org.apache.tuscany.sca.contribution.jee.EjbInfo;
 
 /**
- * The model representing an EJB implementation in an SCA assembly model.
- *
- * @version $Rev$ $Date$
+ * The model representing an EJB implementation in an SCA assembly model when 
the 
+ * EJB implementation has been generated by introspecting a non-enhanced EAR $
  */
 class EJBImplementationGeneratedImpl extends ImplementationImpl implements 
EJBImplementationGenerated {
 
-    private String ejbLink;
+    private EjbInfo ejbInfo;
 
     /**
      * Constructs a new EJB implementation.
@@ -50,18 +43,18 @@
         // The EJB implementation does not support constrainingTypes
         return null;
     }
-
-    public String getEJBLink() {
-        return ejbLink;
-    }
-    
+   
     @Override
     public void setConstrainingType(ConstrainingType constrainingType) {
         // The EJB implementation does not support constrainingTypes
     }
-
-    public void setEJBLink(String ejbLink) {
-        this.ejbLink = ejbLink;
+    
+    public EjbInfo getEJBInfo() {
+        return ejbInfo;
+    }
+    
+    public void setEJBInfo(EjbInfo ejbInfo) {
+        this.ejbInfo = ejbInfo;
     }
     
 }

Modified: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java
 Thu May 28 17:59:27 2009
@@ -109,7 +109,7 @@
         for(Map.Entry<String, EjbInfo> entry : 
ejbModule.getEjbInfos().entrySet()) {
             EjbInfo ejbInfo = entry.getValue();
             
-            Component component = findComponent(composite, ejbInfo.beanName);
+            Component component = findComponent(composite, ejbInfo);
             
             if(ejbInfo.ejbType.compareTo(EjbType.MESSAGE_DRIVEN) != 0) {
                 for(Class<?> intf : ejbInfo.businessRemote) {
@@ -161,7 +161,7 @@
             for(Map.Entry<String, EjbInfo> entry : 
ejbModule.getEjbInfos().entrySet()) {
                 EjbInfo ejbInfo = entry.getValue();
                 
-                Component component = findComponent(composite, 
ejbInfo.beanName);
+                Component component = findComponent(composite, ejbInfo);
                 
                 if(ejbInfo.ejbType.compareTo(EjbType.MESSAGE_DRIVEN) != 0) {
                     for(Class<?> intf : ejbInfo.businessRemote) {
@@ -211,11 +211,12 @@
      * in the JEE archive. Given the JEEimplemenation composite find a named 
component 
      * it if already exists or create it if it doesn't. 
      * 
-     * @param composite
+     * @param ejbInfo
      * @param componentName
      * @return
      */
-    private Component findComponent(Composite composite, String componentName){
+    private Component findComponent(Composite composite, EjbInfo ejbInfo){
+        String componentName = ejbInfo.beanName;
         Component component = null;
         
         for (Component tmpComponent : composite.getComponents()){
@@ -233,6 +234,7 @@
             
             EJBImplementationGenerated implementation = new 
EJBImplementationGeneratedImpl();
             implementation.setUnresolved(true);
+            implementation.setEJBInfo(ejbInfo);
             component.setImplementation(implementation);
         }
         

Modified: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java
 Thu May 28 17:59:27 2009
@@ -42,6 +42,7 @@
 import org.apache.tuscany.sca.contribution.jee.EnvEntryInfo;
 import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo;
 import org.apache.tuscany.sca.contribution.jee.JavaEEOptionalExtension;
+import org.apache.tuscany.sca.contribution.jee.WebImplementationGenerated;
 import org.apache.tuscany.sca.contribution.jee.WebModuleInfo;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -176,7 +177,7 @@
     
     public void createImplementationJeeComposite(WebModuleInfo webModule, 
Composite composite) {
         
-        Component component = findComponent(composite, 
webModule.getModuleName());
+        Component component = findComponent(composite, webModule);
         
         // Process Remote EJB References
         for(Map.Entry<String, EjbReferenceInfo> entry : 
webModule.getEjbReferences().entrySet()) {
@@ -205,7 +206,7 @@
         for(Map.Entry<String, EjbInfo> entry : 
ejbModule.getEjbInfos().entrySet()) {
             EjbInfo ejbInfo = entry.getValue();
             
-            Component component = findComponent(composite, ejbInfo.beanName);
+            Component component = findComponent(composite, ejbInfo);
             
             // Process Remote EJB References
             for(Map.Entry<String, EjbReferenceInfo> entry1 : 
ejbInfo.ejbReferences.entrySet()) {
@@ -240,7 +241,7 @@
             for(Map.Entry<String, EjbInfo> entry : 
ejbModule.getEjbInfos().entrySet()) {
                 EjbInfo ejbInfo = entry.getValue();
                 
-                Component component = findComponent(composite, 
ejbInfo.beanName);
+                Component component = findComponent(composite, ejbInfo);
                 
                 // Process Remote EJB References
                 for(Map.Entry<String, EjbReferenceInfo> entry1 : 
ejbInfo.ejbReferences.entrySet()) {
@@ -268,15 +269,16 @@
     }   
     
     /**
-     * We are fluffing up the JEEImplemention composite to represented the 
components
+     * We are fluffing up the JEEImplemention composite to represent the 
components
      * in the JEE archive. Given the JEEimplemenation composite find a named 
component 
      * it if already exists or create it if it doesn't. 
      * 
      * @param composite
-     * @param componentName
+     * @param ejbInfo
      * @return
      */
-    private Component findComponent(Composite composite, String componentName){
+    private Component findComponent(Composite composite, EjbInfo ejbInfo){
+        String componentName = ejbInfo.beanName;
         Component component = null;
         
         for (Component tmpComponent : composite.getComponents()){
@@ -294,6 +296,7 @@
             
             EJBImplementationGenerated implementation = new 
EJBImplementationGeneratedImpl();
             implementation.setUnresolved(true);
+            implementation.setEJBInfo(ejbInfo);
             component.setImplementation(implementation);
         }
         
@@ -301,6 +304,42 @@
     } 
     
     /**
+     * We are fluffing up the JEEImplemention composite to represent the 
components
+     * in the JEE archive. Given the JEEimplemenation composite find a named 
component 
+     * it if already exists or create it if it doesn't. 
+     * 
+     * @param composite
+     * @param ejbInfo
+     * @return
+     */
+    private Component findComponent(Composite composite, WebModuleInfo 
webInfo){
+        String componentName = webInfo.getModuleName();
+        Component component = null;
+        
+        for (Component tmpComponent : composite.getComponents()){
+            if (tmpComponent.getName().equals(componentName)){
+               component = tmpComponent;
+               break;
+            }
+        }
+         
+        if (component == null){
+            component = assemblyFactory.createComponent();
+            component.setName(componentName);
+            component.setUnresolved(true);
+            composite.getComponents().add(component);
+            
+            WebImplementationGenerated implementation = new 
WebImplementationGeneratedImpl();
+            implementation.setUnresolved(true);
+            // need generated impl to represent web modules
+            implementation.setWebInfo(webInfo);
+            component.setImplementation(implementation);
+        }
+        
+        return component;
+    }     
+    
+    /**
      * Add a component reference and fluff up a composite reference to match
      * 
      * @param composite

Added: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java?rev=779701&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
 Thu May 28 17:59:27 2009
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on 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.sca.contribution.jee.impl;
+
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
+import org.apache.tuscany.sca.contribution.jee.WebImplementationGenerated;
+import org.apache.tuscany.sca.contribution.jee.WebModuleInfo;
+
+
+/**
+ * The model representing a WEB implementation in an SCA assembly model when 
the 
+ * WEB implementation has been generated by introspecting a non-enhanced EAR
+ */
+class WebImplementationGeneratedImpl extends ImplementationImpl implements 
WebImplementationGenerated {
+
+    private WebModuleInfo webInfo;
+
+    /**
+     * Constructs a new EJB implementation.
+     */
+    WebImplementationGeneratedImpl() {
+        super();
+    }
+
+    @Override
+    public ConstrainingType getConstrainingType() {
+        // The Web implementation does not support constrainingTypes
+        return null;
+    }
+   
+    @Override
+    public void setConstrainingType(ConstrainingType constrainingType) {
+        // The Web implementation does not support constrainingTypes
+    }
+    
+    public WebModuleInfo getWebInfo() {
+        return webInfo;
+    }
+    
+    public void setWebInfo(WebModuleInfo webInfo) {
+        this.webInfo = webInfo;        
+    }
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java?rev=779701&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
 Thu May 28 17:59:27 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on 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.sca.contribution.jee.impl;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import 
org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+
+/**
+ * Dummy processor that's used to mark WebImplementationGeneratedImpl instance
+ * as resolved at the appropriate point in the resolution processing
+ * 
+ */
+public class WebImplementationGeneratedProcessor extends 
BaseStAXArtifactProcessor implements 
StAXArtifactProcessor<WebImplementationGeneratedImpl> {
+    
+    public WebImplementationGeneratedProcessor(ExtensionPointRegistry registry,
+                                               Monitor monitor) {
+    }
+
+    public QName getArtifactType() {
+        return null;
+    }
+
+    public Class<WebImplementationGeneratedImpl> getModelType() {
+        // Returns the type of model processed by this processor
+        return WebImplementationGeneratedImpl.class;
+    }
+
+    public WebImplementationGeneratedImpl read(XMLStreamReader reader) throws 
ContributionReadException, XMLStreamException {
+        return null;
+    }
+
+    public void resolve(WebImplementationGeneratedImpl implementation, 
ModelResolver resolver) throws ContributionResolveException {
+        implementation.setUnresolved(false);
+    }
+
+    public void write(WebImplementationGeneratedImpl implementation, 
XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
+    }
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebImplementationGeneratedProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
 Thu May 28 17:59:27 2009
@@ -19,3 +19,4 @@
 
 # Implementation class for the artifact processor extension
 
org.apache.tuscany.sca.contribution.jee.impl.EJBImplementationGeneratedProcessor;qname=http://dummy_namespace/#dummy.name,model=org.apache.tuscany.sca.contribution.jee.impl.EJBImplementationGeneratedImpl,factory=dummy
+org.apache.tuscany.sca.contribution.jee.impl.WebImplementationGeneratedProcessor;qname=http://dummy_namespace/#dummy.name,model=org.apache.tuscany.sca.contribution.jee.impl.WebImplementationGeneratedImpl,factory=dummy

Modified: 
tuscany/branches/sca-java-1.x/modules/implementation-jee/src/main/java/org/apache/tuscany/sca/implementation/jee/xml/JEEImplementationProcessor.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-jee/src/main/java/org/apache/tuscany/sca/implementation/jee/xml/JEEImplementationProcessor.java?rev=779701&r1=779700&r2=779701&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/implementation-jee/src/main/java/org/apache/tuscany/sca/implementation/jee/xml/JEEImplementationProcessor.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/implementation-jee/src/main/java/org/apache/tuscany/sca/implementation/jee/xml/JEEImplementationProcessor.java
 Thu May 28 17:59:27 2009
@@ -213,6 +213,8 @@
                     if(jeeOptionalExtension != null) {
                         
jeeOptionalExtension.createImplementationJeeComposite((WebModuleInfo)moduleInfo,
 implementation);
                     }
+                    // now resolve the implementation composite as a real 
composite. 
+                    compositeProcessor.resolve((Composite)implementation, 
resolver);
                 }
             } else if(moduleInfo instanceof EjbModuleInfo) {
                 // Check for ejb-jar composite
@@ -236,6 +238,8 @@
                     if(jeeOptionalExtension != null) {
                         
jeeOptionalExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo,
 implementation);
                     }
+                    // now resolve the implementation composite as a real 
composite. 
+                    compositeProcessor.resolve((Composite)implementation, 
resolver);
                 }
             } else if(moduleInfo instanceof JavaEEApplicationInfo) {
                 // Check for application composite
@@ -268,14 +272,13 @@
                     if(jeeOptionalExtension != null) {
                         
jeeOptionalExtension.createImplementationJeeComposite((JavaEEApplicationInfo)moduleInfo,
 implementation);
                     }
+                    // now resolve the implementation composite as a real 
composite. 
+                    compositeProcessor.resolve((Composite)implementation, 
resolver);
                 }
             }
             
-            // now resolve the implementation composite as a real composite. 
-            // Any artifacts from an application composite will already be 
resolved. 
-            // Composite artifacts created on the fly to represent a 
non-enhanced JEE 
-            // archive need to be resolved. 
-            compositeProcessor.resolve((Composite)implementation, resolver);
+            // we could have resolved the whole implementation composite here 
except that 
+            // it messes up the resolvers associated with the 
         }
         implementation.setUnresolved(false);
     }


Reply via email to