Are you sure that you'll have the same Thread after a redirect? I
thought a redirect was sent back to the client (browser) which then
makes a new request to the server? AFAIK there's no way to be sure
you'll have the same Thread (or to tell that you're getting a request
that's the result of a redirect you just sent from this Thread). If you
want transactional action chaining, you should use the
ActionChainResult, not a redirect.

> -----Original Message-----
> From: James Cook [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 25, 2003 8:39 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] Issue with component lifecycle dependencies
> 
> 
> Thanks for the details on this approach. Can you post some 
> code to the Wiki? Just one question regarding transactions in 
> such a scheme.
> 
> If my action chain looks like this:
> 
> ActionA --> redirect --> ActionB
> 
> Will your solution easily allow a transaction to be ACID if I 
> do database work in both ActionA and ActionB? I ask this 
> since a new request would be issued in ActionB, however it 
> should still use the same ThreadLocal. I suppose you could 
> check to see if an SA already exists before creating a new one?
> 
> How does your ServletFilter know that a rollback is in order 
> as opposed to a commit? Or is that still done in the Actions?
> 
> Thanks...
> 
> -----Original Message-----
> From: Jon Lipsky
> I have an app scoped component called PersistanceManager (PM)
> 
> When a request comes in (A) it calls PM.getSession() and puts 
> thes the session (SA) in the request and into a ThreadLocal variable.
> 
> When a request comes in (B) it calls PM.getSession() and puts 
> thes the session (SB) in the request and into a ThreadLocal variable.
> 
> Similary, the request is finished the ServletFilter takes 
> care of closing the session when the request is done.
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to