cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1519652 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Date Tue, 03 Sep 2013 11:28:36 GMT
Author: sergeyb
Date: Tue Sep  3 11:28:36 2013
New Revision: 1519652

URL: http://svn.apache.org/r1519652
Log:
Merged revisions 1519647 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1519647 | sergeyb | 2013-09-03 12:19:15 +0100 (Tue, 03 Sep 2013) | 1 line
  
  Minor updates to CXFNonSpringJaxrsServlet to make it simpler to override methods creating
Application
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1519647

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java?rev=1519652&r1=1519651&r2=1519652&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Tue Sep  3 11:28:36 2013
@@ -88,14 +88,13 @@ public class CXFNonSpringJaxrsServlet ex
     public void init(ServletConfig servletConfig) throws ServletException {
         super.init(servletConfig);
         
-        String splitChar = getParameterSplitChar(servletConfig);
-                
         String applicationClass = servletConfig.getInitParameter(JAXRS_APPLICATION_PARAM);
         if (applicationClass != null) {
-            createServerFromApplication(applicationClass, servletConfig, splitChar);
+            createServerFromApplication(applicationClass, servletConfig);
             return;
         }
         
+        String splitChar = getParameterSplitChar(servletConfig);
         JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
         bean.setBus(getBus());
         
@@ -428,18 +427,18 @@ public class CXFNonSpringJaxrsServlet ex
         
     }
     
-    protected void createServerFromApplication(String cName, ServletConfig servletConfig,
-                                               String splitChar) 
+    protected void createServerFromApplication(String cName, ServletConfig servletConfig)

         throws ServletException {
         Map<String, List<String>> props = new HashMap<String, List<String>>();
         cName = getClassNameAndProperties(cName, props);
-        Class<?> appClass = loadClass(cName, "Application");
+        Class<?> appClass = loadApplicationClass(cName);
         Application app = (Application)createSingletonInstance(appClass, props, servletConfig);
         
         String ignoreParam = servletConfig.getInitParameter(IGNORE_APP_PATH_PARAM);
         JAXRSServerFactoryBean bean = ResourceUtils.createApplication(app, 
                                             MessageUtils.isTrue(ignoreParam),
                                             getStaticSubResolutionValue(servletConfig));
+        String splitChar = getParameterSplitChar(servletConfig);
         setAllInterceptors(bean, servletConfig, splitChar);
         setInvoker(bean, servletConfig);
         setExtensions(bean, servletConfig);
@@ -450,6 +449,10 @@ public class CXFNonSpringJaxrsServlet ex
         bean.create();
     }
     
+    protected Class<?> loadApplicationClass(String appClassName) throws ServletException
{
+        return loadClass(appClassName, "Application");
+    }
+    
     protected Class<?> loadClass(String cName) throws ServletException {
         return loadClass(cName, "Resource");
     }



Mime
View raw message