cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r507417 - in /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler: AnnotationHandlerChainBuilder.java HandlerChainBuilder.java
Date Wed, 14 Feb 2007 06:46:11 GMT
Author: jliu
Date: Tue Feb 13 22:46:10 2007
New Revision: 507417

URL: http://svn.apache.org/viewvc?view=rev&rev=507417
Log:
CXF-408: Refactor the call of resolving handler config file into a protected method, so that
the default behavior could be overwritten.  

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java?view=diff&rev=507417&r1=507416&r2=507417
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
Tue Feb 13 22:46:10 2007
@@ -70,7 +70,7 @@
                 JAXBContext jc = JAXBContext
                         .newInstance(org.apache.cxf.jaxws.javaee.ObjectFactory.class);
                 Unmarshaller u = jc.createUnmarshaller();                
-                URL handlerFileURL  = clz.getResource(hcAnn.getFileName()); 
+                URL handlerFileURL  = resolveHandlerChainFile(clz, hcAnn.getFileName());

                 JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(handlerFileURL);
 
                 HandlerChainsType handlerChainsType = (HandlerChainsType) o.getValue();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java?view=diff&rev=507417&r1=507416&r2=507417
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
Tue Feb 13 22:46:10 2007
@@ -21,6 +21,7 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -124,7 +125,18 @@
         }
         return handlerChain;
     }
-
+    
+    /**
+     * Resolve handler chain configuration file associated with the given class
+     * 
+     * @param clz
+     * @param filename
+     * @return A URL object or null if no resource with this name is found
+     */    
+    protected URL resolveHandlerChainFile(Class clz, String filename) {
+        return clz.getResource(filename);
+    } 
+    
     private void configureHandler(Handler handler, PortComponentHandlerType h) {
         if (!handlerInitEnabled) {
             return;



Mime
View raw message