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
This commit is contained in:
parent
5f70131cb4
commit
171b522071
4 changed files with 31 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue