diff options
author | vamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-14 11:44:26 +0000 |
---|---|---|
committer | vamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-14 11:44:26 +0000 |
commit | fa3b39ed720bfe83911996c673b72a608a3c7cbf (patch) | |
tree | a392864faad4cd72c3122d76b6a4caf81bfa89b2 /java/sca/modules/contribution-jee/src | |
parent | 836523e74bbdebd0dab0e0f6a30542b9bba9ddb7 (diff) |
Add ejb intent to the computed references.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@685861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/contribution-jee/src')
4 files changed, 12 insertions, 1 deletions
diff --git a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/AssemblyHelper.java b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/AssemblyHelper.java index 3634be3bec..547ba52e74 100644 --- a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/AssemblyHelper.java +++ b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/AssemblyHelper.java @@ -54,7 +54,8 @@ public class AssemblyHelper { private JavaInterfaceFactory jif; public static final Map<String, QName> ALLOWED_ENV_ENTRY_TYPES; - public static Intent CONVERSATIONAL_INTENT; + public static final Intent CONVERSATIONAL_INTENT; + public static final Intent EJB_INTENT; static { ALLOWED_ENV_ENTRY_TYPES = new HashMap<String, QName>(); ALLOWED_ENV_ENTRY_TYPES.put(String.class.getName(), new QName("http://www.w3.org/2001/XMLSchema", "string", @@ -80,6 +81,8 @@ public class AssemblyHelper { CONVERSATIONAL_INTENT = dpf.createIntent(); CONVERSATIONAL_INTENT.setName(new QName("http://www.osoa.org/xmlns/sca/1.0", "conversational")); + EJB_INTENT = dpf.createIntent(); + EJB_INTENT.setName(new QName("http://www.osoa.org/xmlns/sca/1.0", "ejb")); } public AssemblyHelper() { diff --git a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBModuleProcessor.java b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBModuleProcessor.java index 41107b5cba..34b54ed238 100644 --- a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBModuleProcessor.java +++ b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EJBModuleProcessor.java @@ -180,6 +180,7 @@ public class EJBModuleProcessor { ComponentReference componentReference = helper.createComponentReference(); componentReference.setReference(reference); componentReference.setInterfaceContract(reference.getInterfaceContract()); + componentReference.getRequiredIntents().addAll(reference.getRequiredIntents()); component.getReferences().add(componentReference); } @@ -206,6 +207,7 @@ public class EJBModuleProcessor { for (ComponentReference reference : component.getReferences()) { CompositeReference compositeReference = helper.createCompositeReference(); compositeReference.setInterfaceContract(reference.getInterfaceContract()); + compositeReference.getRequiredIntents().addAll(reference.getRequiredIntents()); compositeReference.getPromotedReferences().add(reference); composite.getReferences().add(compositeReference); } @@ -291,6 +293,7 @@ public class EJBModuleProcessor { throw new ContributionException(e); } reference.setInterfaceContract(ic); + reference.getRequiredIntents().add(AssemblyHelper.EJB_INTENT); componentType.getReferences().add(reference); } @@ -335,6 +338,7 @@ public class EJBModuleProcessor { throw new ContributionException(e); } reference.setInterfaceContract(ic); + reference.getRequiredIntents().add(AssemblyHelper.EJB_INTENT); componentType.getReferences().add(reference); } diff --git a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEApplicationProcessor.java b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEApplicationProcessor.java index d709a1b07e..2ecabb9a23 100644 --- a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEApplicationProcessor.java +++ b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEApplicationProcessor.java @@ -81,6 +81,7 @@ public class JavaEEApplicationProcessor { String referenceName = beanName2+"_"+reference.getName(); reference2.setName(referenceName); reference2.setInterfaceContract(reference.getInterfaceContract()); + reference2.getRequiredIntents().addAll(reference.getRequiredIntents()); componentType.getReferences().add(reference2); } } diff --git a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebModuleProcessor.java b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebModuleProcessor.java index f784252b61..58821b767d 100644 --- a/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebModuleProcessor.java +++ b/java/sca/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/WebModuleProcessor.java @@ -87,6 +87,7 @@ public class WebModuleProcessor { throw new ContributionException(e); } reference.setInterfaceContract(ic); + reference.getRequiredIntents().add(AssemblyHelper.EJB_INTENT); componentType.getReferences().add(reference); } @@ -131,6 +132,7 @@ public class WebModuleProcessor { ComponentReference componentReference = helper.createComponentReference(); componentReference.setReference(reference); componentReference.setInterfaceContract(reference.getInterfaceContract()); + componentReference.getRequiredIntents().addAll(reference.getRequiredIntents()); component.getReferences().add(componentReference); } @@ -148,6 +150,7 @@ public class WebModuleProcessor { for (ComponentReference reference : component.getReferences()) { CompositeReference compositeReference = helper.createCompositeReference(); compositeReference.setInterfaceContract(reference.getInterfaceContract()); + compositeReference.getRequiredIntents().addAll(reference.getRequiredIntents()); compositeReference.getPromotedReferences().add(reference); composite.getReferences().add(compositeReference); } |