DAO and Transactions

Discussions

General J2EE: DAO and Transactions

  1. DAO and Transactions (3 messages)

    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.

    Threaded Messages (3)

  2. look at ibatis.com[ Go to top ]

    The ibatis database layer provides a DAO framework

     http://www.ibatis.com/common/common.html

    Transactions are supported.
  3. DAO, transactions[ Go to top ]

    I am writing an article that discusses the DAO design pattern and transactions.

    Contact me for details.... sean <_at_> seansullivan <_dot_> com
  4. DAO, transaction demarcation[ Go to top ]

    My article discusses DAO's and transaction demarcation

    http://www-106.ibm.com/developerworks/java/library/j-dao/