cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1519673 - in /cxf/branches/2.7.x-fixes: ./ distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Date Tue, 03 Sep 2013 13:23:09 GMT
Author: sergeyb
Date: Tue Sep  3 13:23:09 2013
New Revision: 1519673

URL: http://svn.apache.org/r1519673
Log:
Merged revisions 1519671-1519672 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1519671 | sergeyb | 2013-09-03 14:20:31 +0100 (Tue, 03 Sep 2013) | 1 line
  
  One more minor update to CXFNonSpringJaxrsServlet and the demo
........
  r1519672 | sergeyb | 2013-09-03 14:21:11 +0100 (Tue, 03 Sep 2013) | 1 line
  
  One more minor update to CXFNonSpringJaxrsServlet and the demo, forgot the demo update
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
    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:r1519671-1519672

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

Modified: cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java?rev=1519673&r1=1519672&r2=1519673&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
(original)
+++ cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
Tue Sep  3 13:23:09 2013
@@ -19,7 +19,9 @@
 
 package minimalosgi;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
+import javax.ws.rs.core.Application;
 import org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet;
 
 public class SampleServlet extends CXFNonSpringJaxrsServlet {
@@ -27,8 +29,8 @@ public class SampleServlet extends CXFNo
     private static final long serialVersionUID = -1531317723099896635L;
 
     @Override
-    protected Class<?> loadApplicationClass(String cName) throws ServletException {
-        return SampleApplication.class;
+    protected Application createApplicationInstance(String appClassName, ServletConfig servletConfig)
{
+        return new SampleApplication();
     }
 
 }

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=1519673&r1=1519672&r2=1519673&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 13:23:09 2013
@@ -429,10 +429,7 @@ public class CXFNonSpringJaxrsServlet ex
     
     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 = loadApplicationClass(cName);
-        Application app = (Application)createSingletonInstance(appClass, props, servletConfig);
+        Application app = createApplicationInstance(cName, servletConfig);
         
         String ignoreParam = servletConfig.getInitParameter(IGNORE_APP_PATH_PARAM);
         JAXRSServerFactoryBean bean = ResourceUtils.createApplication(app, 
@@ -449,6 +446,14 @@ public class CXFNonSpringJaxrsServlet ex
         bean.create();
     }
     
+    protected Application createApplicationInstance(String appClassName, ServletConfig servletConfig)

+        throws ServletException {
+        Map<String, List<String>> props = new HashMap<String, List<String>>();
+        appClassName = getClassNameAndProperties(appClassName, props);
+        Class<?> appClass = loadApplicationClass(appClassName);
+        return (Application)createSingletonInstance(appClass, props, servletConfig);
+    }
+    
     protected Class<?> loadApplicationClass(String appClassName) throws ServletException
{
         return loadClass(appClassName, "Application");
     }



Mime
View raw message