You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/12/16 21:22:44 UTC

svn commit: r487873 - in /tapestry/tapestry4/trunk/tapestry-framework/src: descriptor/META-INF/ java/org/apache/tapestry/services/impl/

Author: jkuhnert
Date: Sat Dec 16 12:22:43 2006
New Revision: 487873

URL: http://svn.apache.org/viewvc?view=rev&rev=487873
Log:
Resolves TAPESTRY-777. Moved storing WebRequest services in RequestGlobals to the service that creates said 
service objects.

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.request.xml
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/InvokeEngineTerminator.java
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/WebRequestServicerPipelineBridge.java

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.request.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.request.xml?view=diff&rev=487873&r1=487872&r2=487873
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.request.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.request.xml Sat Dec 16 12:22:43 2006
@@ -153,8 +153,7 @@
     <invoke-factory>
       <construct class="impl.InvokeEngineTerminator">
         <set-service property="engineManager" service-id="EngineManager"/>
-        <set-service property="infrastructure" service-id="tapestry.Infrastructure"/>
-        <set-service property="requestGlobals" service-id="tapestry.globals.RequestGlobals"/>		
+        <set-service property="infrastructure" service-id="tapestry.Infrastructure"/>	
       </construct>
     </invoke-factory>
   </service-point> 

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/InvokeEngineTerminator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/InvokeEngineTerminator.java?view=diff&rev=487873&r1=487872&r2=487873
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/InvokeEngineTerminator.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/InvokeEngineTerminator.java Sat Dec 16 12:22:43 2006
@@ -20,7 +20,6 @@
 import org.apache.tapestry.IEngine;
 import org.apache.tapestry.services.EngineManager;
 import org.apache.tapestry.services.Infrastructure;
-import org.apache.tapestry.services.RequestGlobals;
 import org.apache.tapestry.services.WebRequestServicer;
 import org.apache.tapestry.web.WebRequest;
 import org.apache.tapestry.web.WebResponse;
@@ -29,7 +28,6 @@
  * The terminatior for the <code>tapestry.RequestProcessor</code> pipeline, this service is
  * responsible for:
  * <ul>
- * <li>Storing the request and response into {@link org.apache.tapestry.services.RequestGlobals}.
  * <li>Locating the correct engine instance and letting it to the rest of the request.
  * <li>Returning the engine instance to the pool at the end of the request. </ul>
  * 
@@ -42,14 +40,10 @@
 
     private Infrastructure _infrastructure;
 
-    private RequestGlobals _requestGlobals;
-
     public void service(WebRequest request, WebResponse response) throws IOException
     {
-        _requestGlobals.store(request, response);
-
         IEngine engine = _engineManager.getEngineInstance();
-
+        
         // Until we can inject the infrastructure into the engine
         // we do this to let the engine know about it.
 
@@ -74,10 +68,5 @@
     public void setInfrastructure(Infrastructure infrastructure)
     {
         _infrastructure = infrastructure;
-    }
-
-    public void setRequestGlobals(RequestGlobals requestGlobals)
-    {
-        _requestGlobals = requestGlobals;
     }
 }

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/WebRequestServicerPipelineBridge.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/WebRequestServicerPipelineBridge.java?view=diff&rev=487873&r1=487872&r2=487873
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/WebRequestServicerPipelineBridge.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/WebRequestServicerPipelineBridge.java Sat Dec 16 12:22:43 2006
@@ -34,6 +34,9 @@
  * web response into {@link org.apache.tapestry.services.RequestGlobals}. Intercepts runtime
  * exceptions and throws them wrapped as {@link javax.servlet.ServletException}.
  * 
+ * <p>This service is responsible for for storing the http/web request wrappers into 
+ *  {@link RequestGlobals}.</p>
+ * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
@@ -47,10 +50,12 @@
             throws IOException, ServletException
     {
         _requestGlobals.store(request, response);
-
+        
         WebRequest webRequest = new ServletWebRequest(request, response);
         WebResponse webResponse = new ServletWebResponse(response);
-
+        
+        _requestGlobals.store(webRequest, webResponse);
+        
         try
         {
             _webRequestServicer.service(webRequest, webResponse);