geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r594403 - in /geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src: main/java/org/apache/geronimo/j2ee/deployment/annotation/ test/java/org/apache/geronimo/j2ee/deployment/annotation/ test/resources/annotation/
Date Tue, 13 Nov 2007 02:55:44 GMT
Author: gawor
Date: Mon Nov 12 18:55:43 2007
New Revision: 594403

URL: http://svn.apache.org/viewvc?rev=594403&view=rev
Log:
handlerChains in DD overwrite HandlerChain annotation (GERONIMO-3598)

Modified:
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationHelper.java
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml
    geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationHelper.java?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationHelper.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationHelper.java
Mon Nov 12 18:55:43 2007
@@ -217,7 +217,7 @@
                     ServiceRefType[] serviceRefs = annotatedApp.getServiceRefArray();
                     boolean exists = false;
                     for ( ServiceRefType serviceRef : serviceRefs ) {
-                        if ( serviceRef.getServiceRefName().getStringValue().trim().equals(serviceRefName)
) {
+                        if ( serviceRef.getServiceRefName().getStringValue().trim().equals(serviceRefName)
&& !serviceRef.isSetHandlerChains()) {
                             ServiceRefHandlerChainsType serviceRefHandlerChains = serviceRef.addNewHandlerChains();
                             for (HandlerChainType handlerChain : handlerChains.getHandlerChainArray())
{
                                 ServiceRefHandlerChainType serviceRefHandlerChain = serviceRefHandlerChains.addNewHandlerChain();

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java
Mon Nov 12 18:55:43 2007
@@ -113,7 +113,7 @@
 
         List<Method> annotatedMethods = classFinder.findAnnotatedMethods(HandlerChain.class);
         assertNotNull(annotatedMethods);
-        assertEquals(2, annotatedMethods.size());
+        assertEquals(3, annotatedMethods.size());
         assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1",
new Class[]{String.class})));
         assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2",
new Class[]{int.class})));
 
@@ -233,7 +233,7 @@
 
         List<Method> annotatedMethods = classFinder.findAnnotatedMethods(WebServiceRef.class);
         assertNotNull(annotatedMethods);
-        assertEquals(4, annotatedMethods.size());
+        assertEquals(5, annotatedMethods.size());
         assertTrue(annotatedMethods.contains(WebServiceRefAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1",
new Class[]{boolean.class})));
         assertTrue(annotatedMethods.contains(WebServiceRefAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2",
new Class[]{String.class})));
         assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1",
new Class[]{String.class})));

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java
Mon Nov 12 18:55:43 2007
@@ -61,4 +61,12 @@
     public void setAnnotatedMethod2(int ii) {
     }
 
+    @WebServiceRef(name = "WebServiceRef100",
+            value = javax.xml.ws.Service.class,
+            wsdlLocation = "WEB-INF/wsdl/WebServiceRef4.wsdl",
+            mappedName = "mappedName")
+    @HandlerChain(file = "annotation/handlers5.xml")
+    public void setAnnotatedMethod3(int ii) {
+    }
+
 }

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml
Mon Nov 12 18:55:43 2007
@@ -101,5 +101,17 @@
             <injection-target-name>annotatedField2</injection-target-name>
         </injection-target>
     </service-ref>
-
+    <service-ref>
+        <service-ref-name>WebServiceRef100</service-ref-name>
+        <service-interface>int</service-interface>
+        <service-ref-type>int</service-ref-type>
+        <handler-chains>
+            <handler-chain>
+                <handler>
+                    <handler-name>MyHandler</handler-name>
+                    <handler-class>org.apache.handler.WebServiceHandler3</handler-class>
+                </handler>
+            </handler-chain>
+        </handler-chains>
+    </service-ref>
 </web-app>

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml
Mon Nov 12 18:55:43 2007
@@ -77,5 +77,17 @@
             <injection-target-name>annotatedField2</injection-target-name>
         </injection-target>
     </service-ref>
-
+    <service-ref>
+        <service-ref-name>WebServiceRef100</service-ref-name>
+        <service-interface>int</service-interface>
+        <service-ref-type>int</service-ref-type>
+        <handler-chains>
+            <handler-chain>
+                <handler>
+                    <handler-name>MyHandler</handler-name>
+                    <handler-class>org.apache.handler.WebServiceHandler3</handler-class>
+                </handler>
+            </handler-chain>
+        </handler-chains>
+    </service-ref>
 </web-app>

Modified: geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml?rev=594403&r1=594402&r2=594403&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml
Mon Nov 12 18:55:43 2007
@@ -59,6 +59,17 @@
         </injection-target>
     </service-ref>
     <service-ref>
+        <service-ref-name>WebServiceRef100</service-ref-name>
+        <service-interface>javax.xml.ws.Service</service-interface>
+        <service-ref-type>int</service-ref-type>
+        <wsdl-file>WEB-INF/wsdl/WebServiceRef4.wsdl</wsdl-file>
+        <mapped-name>mappedName</mapped-name>
+        <injection-target>
+            <injection-target-class>org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationTest</injection-target-class>
+            <injection-target-name>annotatedMethod3</injection-target-name>
+        </injection-target>
+    </service-ref>
+    <service-ref>
         <service-ref-name>WebServiceRef14</service-ref-name>
         <service-interface>boolean</service-interface>
         <service-ref-type>boolean</service-ref-type>



Mime
View raw message