You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2010/07/30 17:46:45 UTC
svn commit: r980869 -
/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
Author: slaws
Date: Fri Jul 30 15:46:45 2010
New Revision: 980869
URL: http://svn.apache.org/viewvc?rev=980869&view=rev
Log:
Changes to make POJO_8016 run. Look for @Remotable at the class level.
Modified:
tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java?rev=980869&r1=980868&r2=980869&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java Fri Jul 30 15:46:45 2010
@@ -78,7 +78,7 @@ public class ServiceProcessor extends Ba
) {
Service service;
try {
- service = createService(interfaze, null);
+ service = createService(clazz, interfaze, null);
} catch (InvalidInterfaceException e) {
throw new IntrospectionException(e);
}
@@ -124,12 +124,13 @@ public class ServiceProcessor extends Ba
for (int i=0; i < interfaces.length; i++) {
try {
String name = (annotation.names().length > 0) ? annotation.names()[i] : null;
- Service service = createService(interfaces[i], name);
+ Service service = createService(clazz, interfaces[i], name);
type.getServices().add(service);
} catch (InvalidInterfaceException e) {
throw new IntrospectionException(e);
}
}
+
}
protected boolean hasMethod(Method m1, Method[] ms) {
@@ -180,7 +181,7 @@ public class ServiceProcessor extends Ba
createCallback(type, element);
}
- public Service createService(Class<?> interfaze, String name) throws InvalidInterfaceException {
+ public Service createService(Class<?> clazz, Class<?> interfaze, String name) throws InvalidInterfaceException {
Service service = assemblyFactory.createService();
JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
service.setInterfaceContract(interfaceContract);
@@ -192,9 +193,17 @@ public class ServiceProcessor extends Ba
}
JavaInterface callInterface = javaInterfaceFactory.createJavaInterface(interfaze);
+ boolean remotable = clazz.getAnnotation(Remotable.class) != null;
+ if (remotable){
+ callInterface.setRemotable(true);
+ }
service.getInterfaceContract().setInterface(callInterface);
+
if (callInterface.getCallbackClass() != null) {
JavaInterface callbackInterface = javaInterfaceFactory.createJavaInterface(callInterface.getCallbackClass());
+ if (remotable){
+ callbackInterface.setRemotable(true);
+ }
service.getInterfaceContract().setCallbackInterface(callbackInterface);
}
return service;