Wednesday, 18 September 2013

Is possible to have two concurrent transactions in one JDBC connection?

Is possible to have two concurrent transactions in one JDBC connection?

Right now I have two objects sharing a database connection to an Oracle
database in auto commit mode. But now both objects need to start their own
transaction to get their work done.
What is the consequence?
Is it necessary to give each object its own connection in order to have
concurrent transactions or is possible to keep the code as it is and use
the same connection for two concurrent transactions?
And what is the best practice, if I have 10000 objects instead of 2? How
many database connections do I need, if it may be possible for every
object to start a transaction. Do I need 10.000 database connections?

No comments:

Post a Comment