Are you sure that the same ThreadLocal would be used in ActionA and ActionB? Since they are separate HTTP requests, is that guaranteed?
-Pat ----- Original Message ----- From: "James Cook" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 5:38 AM 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