[seam-commits] Seam SVN: r14324 - in branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149: src/main/org/jboss/seam/core and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Feb 17 14:55:13 EST 2012


Author: ivassile
Date: 2012-02-17 14:55:13 -0500 (Fri, 17 Feb 2012)
New Revision: 14324

Modified:
   branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/contexts/ServletLifecycle.java
   branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/core/ResourceLoader.java
   branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java
Log:
One-off patch JBPAPP-8149
Integrate changes 12127 and 11185

Modified: branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
--- branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/contexts/ServletLifecycle.java	2012-02-17 19:52:18 UTC (rev 14323)
+++ branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/contexts/ServletLifecycle.java	2012-02-17 19:55:13 UTC (rev 14324)
@@ -160,7 +160,7 @@
       WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
       context.setAttribute("seam.context.classLoader",ref);
       log.debug("Cached the context classloader in servletContext as 'seam.context.classLoader'");
-
+      context.setAttribute(SERVLET_CONTEXT_KEY, context); 
       servletContext = context;
       Lifecycle.beginApplication( new ServletApplicationMap(context) );
    }

Modified: branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/core/ResourceLoader.java
===================================================================
--- branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/core/ResourceLoader.java	2012-02-17 19:52:18 UTC (rev 14323)
+++ branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/src/main/org/jboss/seam/core/ResourceLoader.java	2012-02-17 19:55:13 UTC (rev 14324)
@@ -52,12 +52,12 @@
    
    public InputStream getResourceAsStream(String resource)
    {
-      return Resources.getResourceAsStream( resource, ServletLifecycle.getServletContext() );
+      return Resources.getResourceAsStream( resource, ServletLifecycle.getCurrentServletContext() );
    }
 
    public URL getResource(String resource) 
    {
-      return Resources.getResource( resource, ServletLifecycle.getServletContext() );
+      return Resources.getResource( resource, ServletLifecycle.getCurrentServletContext() );
    }
    
    /**

Modified: branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java
===================================================================
--- branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java	2012-02-17 19:52:18 UTC (rev 14323)
+++ branches/enterprise/JBPAPP_5_1_1_JBPAPP-8149/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java	2012-02-17 19:55:13 UTC (rev 14324)
@@ -30,9 +30,9 @@
    public void create()
    {
       // TODO A bit of a hack, we should store the servlet context properly
-      if (ServletLifecycle.getServletContext() != null)
+      if (ServletLifecycle.getCurrentServletContext() != null)
       {
-         servletContext = ServletLifecycle.getServletContext();
+         servletContext = ServletLifecycle.getCurrentServletContext();
       }
       else
       {



More information about the seam-commits mailing list