You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/15 22:16:41 UTC

svn commit: r825631 - /tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java

Author: antelder
Date: Thu Oct 15 20:16:40 2009
New Revision: 825631

URL: http://svn.apache.org/viewvc?rev=825631&view=rev
Log:
Fix SCAJ CAA JCA_10047 - @Scope is not allowed on a service interface class

Modified:
    tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java

Modified: tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java?rev=825631&r1=825630&r2=825631&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java Thu Oct 15 20:16:40 2009
@@ -102,6 +102,15 @@
             }
         }
 
+        //validate no scope on servce interface
+        for (Class<?> iface : interfaces) {
+            for (Annotation aaa : iface.getAnnotations()) {
+                if (iface.getAnnotation(org.oasisopen.sca.annotation.Scope.class) != null) {
+                    throw new IntrospectionException("JCA90041 @Scope annotation not allowed on service interface " + iface.getName());
+                }
+            }
+        }
+        
         //validate service methods implemented
         Method[] ms = clazz.getMethods();
         for (Class<?> iface : interfaces) {