openamf/src/java/org/openamf RequestContext.java,1.2,1.3 DefaultGateway.java,1.56,1.57

Sean Sullivan <[email protected]> Thu, 10 Jun 2004 01:21:01 +0000
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12759/src/java/org/openamf

Modified Files:
	RequestContext.java DefaultGateway.java 
Log Message:


Index: DefaultGateway.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/DefaultGateway.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** DefaultGateway.java	9 Jun 2004 06:13:04 -0000	1.56
--- DefaultGateway.java	10 Jun 2004 01:20:59 -0000	1.57
***************
*** 79,82 ****
--- 79,83 ----
  		try {
  			requestMessage = deserializeAMFMessage(req);
+ 			RequestContext.setRequestMessage(requestMessage);
  
  			if (requestLog.isDebugEnabled()) {

Index: RequestContext.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/RequestContext.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RequestContext.java	31 Mar 2004 03:19:18 -0000	1.2
--- RequestContext.java	10 Jun 2004 01:20:59 -0000	1.3
***************
*** 32,36 ****
  public class RequestContext
  {
! 	static private ThreadLocal requestData = new ThreadLocal();
  	
      private RequestContext()
--- 32,37 ----
  public class RequestContext
  {
! 	static private ThreadLocal httpRequestLocal = new ThreadLocal();
! 	static private ThreadLocal requestMsgLocal = new ThreadLocal();
  	
      private RequestContext()
***************
*** 48,52 ****
      static public void setHttpServletRequest(HttpServletRequest req)
  	{
!     	requestData.set(req);
      }
      
--- 49,53 ----
      static public void setHttpServletRequest(HttpServletRequest req)
  	{
!     	httpRequestLocal.set(req);
      }
      
***************
*** 58,62 ****
      static public void clear()
  	{
!     	requestData.set(null);
      }
      
--- 59,64 ----
      static public void clear()
  	{
!     	httpRequestLocal.set(null);
!     	requestMsgLocal.set(null);
      }
      
***************
*** 71,75 ****
      static public HttpServletRequest getHttpServletRequest()
  	{
!     	HttpServletRequest req = (HttpServletRequest) requestData.get();
      	return req;
      }
--- 73,77 ----
      static public HttpServletRequest getHttpServletRequest()
  	{
!     	HttpServletRequest req = (HttpServletRequest) httpRequestLocal.get();
      	return req;
      }
***************
*** 92,94 ****
--- 94,115 ----
      }
      
+     
+     /**
+      * 
+      * @return may return null 
+      * 
+      */
+     static public AMFMessage getRequestMessage()
+     {
+     	return (AMFMessage) requestMsgLocal.get();
+     }
+ 
+     /**
+      * 
+      */
+     static public void setRequestMessage(AMFMessage m)
+     {
+     	requestMsgLocal.set(m);
+     }
+ 
  }



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org