cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r489706 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon: core/container/spring/Container.java servlet/RequestListener.java servlet/ServletRequestHolder.java
Date Fri, 22 Dec 2006 17:56:28 GMT
Author: cziegeler
Date: Fri Dec 22 09:56:27 2006
New Revision: 489706

URL: http://svn.apache.org/viewvc?view=rev&rev=489706
Log:
Removed unused thread local stuff

Removed:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestListener.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletRequestHolder.java
Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/Container.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/Container.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/Container.java?view=diff&rev=489706&r1=489705&r2=489706
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/Container.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/Container.java
Fri Dec 22 09:56:27 2006
@@ -21,7 +21,6 @@
 import javax.servlet.ServletContext;
 
 import org.apache.cocoon.configuration.Settings;
-import org.apache.cocoon.servlet.ServletRequestHolder;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
 import org.springframework.context.ConfigurableApplicationContext;
@@ -52,9 +51,8 @@
     protected static Container ROOT_CONTAINER;
 
     public static Container getCurrentContainer() {
-        final ServletContext servletContext = ServletRequestHolder.currentServletContext();
         final RequestAttributes attributes = RequestContextHolder.currentRequestAttributes();
-        return getCurrentContainer(servletContext, attributes);
+        return getCurrentContainer(null, attributes);
     }
 
     /**
@@ -71,7 +69,7 @@
                         .getAttribute(CONTAINER_REQUEST_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST);
             }
         }
-        if ( ROOT_CONTAINER == null ) {
+        if ( ROOT_CONTAINER == null && servletContext != null ) {
             final WebApplicationContext parentContext = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
             ROOT_CONTAINER = new Container(parentContext, parentContext.getClassLoader());
         }



Mime
View raw message