I have been trying to set transaction attribute for a private method in EJB but never seem to be working.
I have few questions:
1. Is it possible to pass transaction context from a public method to private method within same stateless session Bean?
2. If we can pass the context, can we change or suspend the transaction in the private method?
Any thoughts? Thank you.
Krish
-
Transaction and Private Methods in EJB (1 messages)
- Posted by: Balaji Krishnamurthy
- Posted on: December 30 2002 17:29 EST
Threaded Messages (1)
- Transaction and Private Methods in EJB by Ferhat SAVCI on January 02 2003 03:24 EST
-
Transaction and Private Methods in EJB[ Go to top ]
- Posted by: Ferhat SAVCI
- Posted on: January 02 2003 03:24 EST
- in response to Balaji Krishnamurthy
If a method's private, it cannot be invoked remotely. If it cannot be invoked remotely, the container isn't interested in it.
You do not "pass" a transaction context around. It is normally attached to the servicing thread.
You can manage the transaction context yourself, using bean managed transactions.