Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction difference  RSS feed

 
Deepika Wadhwa
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
What is the difference between ,if in one Transtion connection object is taken from DataSource (ConnectionPool) or if it taken directly from JDBC.
Will the same tranaction be continued ?
Thanks in advance
Deepika
 
Manoj.C.S
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in connection pool when one user connect to the odbc that connection is carried for entire application and need not go back and connect to the database.. and the hits to the data base is less
where as connectining to database directly.every time form or any has to connect to the database and it is more expensive..
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should get your connection from a DataSource so the container can set things up to participate in the current transaction.
If you do your own thing, you might not have a properly set-up connection .
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!