diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-29 08:22:48 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-29 08:22:48 +0000 |
commit | 171b5220716b9403028c4c9edc054619cf1b9573 (patch) | |
tree | 69c6377bb5e1c1b405c113fca6b1d80eed35f87a /branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca | |
parent | 5f70131cb4a0fea985aed332d12f33e647806a5f (diff) |
TUSCANY-3052 - add EJBModuleInfo to generate EJB implementation to sit alongside the EJBInfo.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@779891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca')
4 files changed, 31 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java index f51a86c003..770fb08279 100644 --- a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java +++ b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBImplementationGenerated.java @@ -40,4 +40,17 @@ public interface EJBImplementationGenerated extends Implementation { */ void setEJBInfo(EjbInfo ejbInfo); + /** + * return the EjbModuleInfo which contains the EJB Info used to generate this object + * + * @return + */ + EjbModuleInfo getEjbModuleInfo(); + + /** + * Set the EjbModuleInfo which contains the EJB Info used to generate this object + * + * @param ejbModuleInfo + */ + void setEjbModuleInfo(EjbModuleInfo ejbModuleInfo); } diff --git a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java index 21be3d07c2..777bc68d10 100644 --- a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java +++ b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EJBImplementationGeneratedImpl.java @@ -22,6 +22,7 @@ import org.apache.tuscany.sca.assembly.ConstrainingType; import org.apache.tuscany.sca.assembly.impl.ImplementationImpl; import org.apache.tuscany.sca.contribution.jee.EJBImplementationGenerated; import org.apache.tuscany.sca.contribution.jee.EjbInfo; +import org.apache.tuscany.sca.contribution.jee.EjbModuleInfo; /** * The model representing an EJB implementation in an SCA assembly model when the @@ -30,6 +31,7 @@ import org.apache.tuscany.sca.contribution.jee.EjbInfo; class EJBImplementationGeneratedImpl extends ImplementationImpl implements EJBImplementationGenerated { private EjbInfo ejbInfo; + private EjbModuleInfo ejbModuleInfo; /** * Constructs a new EJB implementation. @@ -56,5 +58,13 @@ class EJBImplementationGeneratedImpl extends ImplementationImpl implements EJBIm public void setEJBInfo(EjbInfo ejbInfo) { this.ejbInfo = ejbInfo; } + + public EjbModuleInfo getEjbModuleInfo() { + return ejbModuleInfo; + } + + public void setEjbModuleInfo(EjbModuleInfo ejbModuleInfo) { + this.ejbModuleInfo = ejbModuleInfo; + } } diff --git a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java index a1a18c834b..4271a93399 100644 --- a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java +++ b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java @@ -109,7 +109,7 @@ public class JavaEEExtensionImpl implements JavaEEExtension { for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) { EjbInfo ejbInfo = entry.getValue(); - Component component = findComponent(composite, ejbInfo); + Component component = findComponent(composite, ejbInfo, ejbModule); if(ejbInfo.ejbType.compareTo(EjbType.MESSAGE_DRIVEN) != 0) { for(Class<?> intf : ejbInfo.businessRemote) { @@ -161,7 +161,7 @@ public class JavaEEExtensionImpl implements JavaEEExtension { for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) { EjbInfo ejbInfo = entry.getValue(); - Component component = findComponent(composite, ejbInfo); + Component component = findComponent(composite, ejbInfo, ejbModule); if(ejbInfo.ejbType.compareTo(EjbType.MESSAGE_DRIVEN) != 0) { for(Class<?> intf : ejbInfo.businessRemote) { @@ -215,7 +215,7 @@ public class JavaEEExtensionImpl implements JavaEEExtension { * @param componentName * @return */ - private Component findComponent(Composite composite, EjbInfo ejbInfo){ + private Component findComponent(Composite composite, EjbInfo ejbInfo, EjbModuleInfo ejbmoduleInfo){ String componentName = ejbInfo.beanName; Component component = null; @@ -235,6 +235,7 @@ public class JavaEEExtensionImpl implements JavaEEExtension { EJBImplementationGenerated implementation = new EJBImplementationGeneratedImpl(); implementation.setUnresolved(true); implementation.setEJBInfo(ejbInfo); + implementation.setEjbModuleInfo(ejbmoduleInfo); component.setImplementation(implementation); } diff --git a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java index 0dc5667823..e07b6e8aba 100644 --- a/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java +++ b/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java @@ -206,7 +206,7 @@ public class JavaEEOptionalExtensionImpl implements JavaEEOptionalExtension { for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) { EjbInfo ejbInfo = entry.getValue(); - Component component = findComponent(composite, ejbInfo); + Component component = findComponent(composite, ejbInfo, ejbModule); // Process Remote EJB References for(Map.Entry<String, EjbReferenceInfo> entry1 : ejbInfo.ejbReferences.entrySet()) { @@ -241,7 +241,7 @@ public class JavaEEOptionalExtensionImpl implements JavaEEOptionalExtension { for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) { EjbInfo ejbInfo = entry.getValue(); - Component component = findComponent(composite, ejbInfo); + Component component = findComponent(composite, ejbInfo, ejbModule); // Process Remote EJB References for(Map.Entry<String, EjbReferenceInfo> entry1 : ejbInfo.ejbReferences.entrySet()) { @@ -277,7 +277,7 @@ public class JavaEEOptionalExtensionImpl implements JavaEEOptionalExtension { * @param ejbInfo * @return */ - private Component findComponent(Composite composite, EjbInfo ejbInfo){ + private Component findComponent(Composite composite, EjbInfo ejbInfo, EjbModuleInfo ejbmoduleInfo){ String componentName = ejbInfo.beanName; Component component = null; @@ -297,6 +297,7 @@ public class JavaEEOptionalExtensionImpl implements JavaEEOptionalExtension { EJBImplementationGenerated implementation = new EJBImplementationGeneratedImpl(); implementation.setUnresolved(true); implementation.setEJBInfo(ejbInfo); + implementation.setEjbModuleInfo(ejbmoduleInfo); component.setImplementation(implementation); } |