Like to check if the transaction context for the followings are propagated to session bean method2?
1)
tx begin
sb1.method1
sb1.method2
tx end
2)
tx begin
sb1.method1 -> sb1.method2
tx ends
Do explain why and how the transaction works?
Thanks in advance.
-
Transaction in stateless session bean (1 messages)
- Posted by: Graeme Pete
- Posted on: September 20 2005 05:00 EDT
Threaded Messages (1)
- Transaction in stateless session bean by sawan parihar on September 21 2005 03:34 EDT
-
Transaction in stateless session bean[ Go to top ]
- Posted by: sawan parihar
- Posted on: September 21 2005 03:34 EDT
- in response to Graeme Pete
Hi,
tx begin
sb1.method1
sb1.method2
tx end
How the methods are called. If it is some client who has started the transaction and the client is calling method 1 and method 2 in one transaction then transaction context will propogate.
2
tx begin
sb1.method1 -> sb1.method2
tx ends
In this case NO. Reason being you are calling mrthod2 directly from method 1 and container was never given a chance to add its services. If you will do a remote lookup in your method1 and will call method 2 then indeed the transaction context will be propogated.
Hope it helps.