Please note the following steps:
1) A session bean method is invoked and starts a transaction.
2) The session bean calls a POJO (perhaps a delegate or something).
3) The POJO invokes a method on a separate session bean that can support an existing transaction context.
I am assuming the transaction will not propagate automatically through the POJO to the other session bean. Is that a correct assumption? If so, how would I manually handle the propagation through the POJO method?
Thanks in advance for helping me clear this up!
-
Transaction Propagation Question (3 messages)
- Posted by: Bill Willis
- Posted on: January 08 2004 13:47 EST
Threaded Messages (3)
- RE: Transaction Propagation Question by Bill Willis on January 08 2004 14:00 EST
- RE: Transaction Propagation Question by Michael Malkinzon on January 08 2004 15:20 EST
- RE: Transaction Propagation Question by Bill Willis on January 09 2004 08:21 EST
- RE: Transaction Propagation Question by Michael Malkinzon on January 08 2004 15:20 EST
-
RE: Transaction Propagation Question[ Go to top ]
- Posted by: Bill Willis
- Posted on: January 08 2004 14:00 EST
- in response to Bill Willis
Assuming my initial assumption is correct:
As a follow-up, do I need to pass the JTA transaction context as an argument to the POJO? How would I then propagate the transaction context to the second session bean? -
RE: Transaction Propagation Question[ Go to top ]
- Posted by: Michael Malkinzon
- Posted on: January 08 2004 15:20 EST
- in response to Bill Willis
Bill,
The TX Context is tied to the current thread, otherwise you would not be able to use Business Delegate Pattern. Just don't do anything in the POJO to break any EJB restrictions (threading, filesystem access, etc.) and the POJO thread-safe. As long as this is followed you can wrap your EJB Access in as many POJO as you like and still maintain TX Context as specified in your DD.
Goodluck
Mike -
RE: Transaction Propagation Question[ Go to top ]
- Posted by: Bill Willis
- Posted on: January 09 2004 20:21 EST
- in response to Michael Malkinzon
Thanks for your help Mike. I appreciate it.