Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Transaction propagation in DAO!

843854Oct 1 2003 — edited Oct 7 2003
Hi Guys,

DAO pattern suggests that connections are obtained in DAOs itself. This means that if I am calling three DAOs from a session facade, there will be three different connections while dealing with database single transaction. Is this understanding correct?
The problem I am facing is - I am unable to make these three calls as one transaction. (Which is a result of three connections involved in the tx).
If I create a connection in session bean and then send it as parameter while calling these three DAOs, it works fine as a single tx. But I think it defeats the purpose of DAO as obtaining the connection should be the responsibility of DAO, not the session bean.

I am sure I am doing something fundamentally wrong. Can someone guide me here please?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2003
Added on Oct 1 2003
6 comments
205 views