Author: vamsic007
Date: Tue Jan 27 13:45:50 2009
New Revision: 738090
URL: http://svn.apache.org/viewvc?rev=738090&view=rev
Log:
Process services in component pre-processing.
Modified:
tuscany/branches/sca-java-1.x/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/impl/EJBImplementationImpl.java
Modified:
tuscany/branches/sca-java-1.x/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/impl/EJBImplementationImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/impl/EJBImplementationImpl.java?rev=738090&r1=738089&r2=738090&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/impl/EJBImplementationImpl.java
(original)
+++
tuscany/branches/sca-java-1.x/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/impl/EJBImplementationImpl.java
Tue Jan 27 13:45:50 2009
@@ -116,6 +116,12 @@
getProperties().add(createProperty(property));
}
}
+
+ for(Service service : rtc.getServices()) {
+ if (getService(service.getName()) == null) {
+ getServices().add(createService(service));
+ }
+ }
}
protected Reference getReference(String name) {
@@ -155,4 +161,23 @@
}
return newProperty;
}
+
+ protected Service getService(String name) {
+ for (Service service : getServices()) {
+ if (service.getName().equals(name)) {
+ return service;
+ }
+ }
+ return null;
+ }
+
+ protected Service createService(Service service) {
+ Service newService;
+ try {
+ newService = (Service)service.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError(e); // should not ever happen
+ }
+ return newService;
+ }
}