Does anyone know of a good technique or pattern to allow DAO objects to particpate in transactions?
Currently our DAO's (written just like SUN's DAO example from the Core J2EE Pattern) do not have the capability of particpating in a transaction. They all operate independently of each other, each getting their own connection when they need one. Its a great abstraction for client code, until an all or nothing scenario arises.
Of course, our DAO clients could obtain and pass the particpating DAO's a java.sql.Connection, but we would like to hide any Connection details from the client code and not have them worrying with starting, commiting and rolling back transactions.
Thanks in advance for any thoughts.
-
DAO and Transactions (3 messages)
- Posted by: Web Master
- Posted on: March 25 2003 14:39 EST
Threaded Messages (3)
- look at ibatis.com by Sean Sullivan on March 26 2003 11:34 EST
- DAO, transactions by Sean Sullivan on June 03 2003 19:36 EDT
- DAO, transaction demarcation by Sean Sullivan on October 28 2003 11:32 EST
-
look at ibatis.com[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: March 26 2003 11:34 EST
- in response to Web Master
The ibatis database layer provides a DAO framework
http://www.ibatis.com/common/common.html
Transactions are supported. -
DAO, transactions[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: June 03 2003 19:36 EDT
- in response to Web Master
I am writing an article that discusses the DAO design pattern and transactions.
Contact me for details.... sean <_at_> seansullivan <_dot_> com -
DAO, transaction demarcation[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: October 28 2003 11:32 EST
- in response to Web Master
My article discusses DAO's and transaction demarcation
http://www-106.ibm.com/developerworks/java/library/j-dao/