- Posted by: Aneesha Singh
- Posted on: December 24 2001 05:27 EST
I have a question. If I have a DAO that is implemented as a simple java class. I make a connection object at my session bean and pass it to the DAO object. And the DAO object does all its operations on that connection object. Then will the DAO come into the same transaction scope as the session bean???? If not, how can I ensure that it comes into the same transaction scope. I am using Declarative Transaction Management.
This is really urgent. Would appreciate any help,
Yes it will.
The connection represents a session with a specific database. A transaction is associated with a single Connection object (and database).Since you are passing the same Connection object the transaction context will be passed on.