From 80b092105b0f0c1cb1c53e051c9d9812e1a4b079 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 5 Oct 2009 16:06:11 +0000 Subject: TUSCANY-3290 - Improving the logic when considering the SCDL @remotable attribute git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821894 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/impl/JavaInterfaceIntrospectorImpl.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'java/sca/modules') diff --git a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index e659d3a658..36f1fbe23e 100644 --- a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -72,12 +72,6 @@ public class JavaInterfaceIntrospectorImpl { javaInterface.setJavaClass(clazz); boolean remotable = clazz.isAnnotationPresent(Remotable.class); - - if (remotable) { - if (javaInterface.isRemotableSet() && javaInterface.isRemotable() == false) { - throw new InvalidAnnotationException("@Remotable annotation present in a interface marked as not remotable in the SCDL", Remotable.class); - } - } // Consider @javax.ejb.Remote, java.rmi.Remote and javax.ejb.EJBObject // equivalent to @Remotable @@ -97,6 +91,16 @@ public class JavaInterfaceIntrospectorImpl { } } } + + if (remotable) { + if (javaInterface.isRemotableSet() && javaInterface.isRemotable() == false) { + throw new InvalidAnnotationException("@Remotable annotation present in a interface marked as not remotable in the SCDL", Remotable.class); + } + } else { + if (javaInterface.isRemotableSet()) { + remotable = javaInterface.isRemotable(); + } + } javaInterface.setRemotable(remotable); -- cgit v1.2.3