Transactions across multiple DAOs
I have DB operations to be done through multiple DAOs in one transaction. Is is possible to do it using simple JDBC calls?
Re: Transactions across multiple DAOs
Quote:
Originally Posted by
tcstcs
I have DB operations to be done through multiple DAOs in one transaction. Is is possible to do it using simple JDBC calls?
Yes, you can update a database with a transaction using JDBC.
Re: Transactions across multiple DAOs
Then, do you suggest to pass connection objects from one DAO to other? If so, is it a good practice?
Re: Transactions across multiple DAOs
Quote:
Originally Posted by
tcstcs
Then, do you suggest to pass connection objects from one DAO to other? If so, is it a good practice?
The question is quite vague, making it difficult to answer. But read about connection pools