summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/interface-java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-05 16:06:11 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-05 16:06:11 +0000
commit80b092105b0f0c1cb1c53e051c9d9812e1a4b079 (patch)
tree5ea09361affed811d73502005f4489536f78192a /java/sca/modules/interface-java
parent73c734b3e05fdf602237af7e5c245b618f2fcfad (diff)
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
Diffstat (limited to 'java/sca/modules/interface-java')
-rw-r--r--java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java16
1 files changed, 10 insertions, 6 deletions
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);