summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to '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);