cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r900884 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
Date Tue, 19 Jan 2010 18:21:06 GMT
Author: dkulp
Date: Tue Jan 19 18:21:05 2010
New Revision: 900884

URL: http://svn.apache.org/viewvc?rev=900884&view=rev
Log:
Merged revisions 900875 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r900875 | dkulp | 2010-01-19 13:14:05 -0500 (Tue, 19 Jan 2010) | 2 lines
  
  [CXF-2620] Add some guards to prevent NPE with certain use cases and
  Spring 3.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java

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

Modified: cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java?rev=900884&r1=900883&r2=900884&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
Tue Jan 19 18:21:05 2010
@@ -118,7 +118,12 @@
             ctx = bus.getExtension(BusApplicationContext.class);
         } else {
             LOG.info("LOAD_BUS_WITH_APPLICATION_CONTEXT");
-            bus = new SpringBusFactory(ctx).createBus();
+            inRefresh = true;
+            try {
+                bus = new SpringBusFactory(ctx).createBus();
+            } finally {
+                inRefresh = false;
+            }
         }        
         
         ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
@@ -175,7 +180,7 @@
     }
 
     public void onApplicationEvent(ApplicationEvent event) {
-        if (!inRefresh && event instanceof ContextRefreshedEvent) {
+        if (!inRefresh && event instanceof ContextRefreshedEvent && getServletConfig()
!= null) {
             //need to re-do the bus/controller stuff
             try {
                 inRefresh = true;



Mime
View raw message