Author: lresende
Date: Mon Oct  5 16:06:11 2009
New Revision: 821894

URL: http://svn.apache.org/viewvc?rev=821894&view=rev
Log:
TUSCANY-3290 - Improving the logic when considering the SCDL @remotable 
attribute

Modified:
    
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java

Modified: 
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java?rev=821894&r1=821893&r2=821894&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
 (original)
+++ 
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
 Mon Oct  5 16:06:11 2009
@@ -72,12 +72,6 @@
         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 @@
                 }
             }
         }
+        
+        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);
 


Reply via email to