diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-30 15:46:45 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-30 15:46:45 +0000 |
commit | 58bcc11d90ed359cf5db00d6c1b4fa8c179e0a7a (patch) | |
tree | 2815e91534d20e3a1741b59d208811333d0eb91c /sca-java-2.x/trunk/modules/implementation-java/src | |
parent | 6ceef67adfdebed0cad870fdb232350cc3591e8a (diff) |
Changes to make POJO_8016 run. Look for @Remotable at the class level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@980869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java index d062fdc3f2..e30cbd08ef 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java @@ -78,7 +78,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { ) { 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 BaseJavaClassVisitor { 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 BaseJavaClassVisitor { 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 BaseJavaClassVisitor { } 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; |