Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTS and JDBC Connection relationship  RSS feed

prashant patel
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

JTS maintains trasaction in EJB server i wanted to know the relationship of Transaction and connection(resource) while rollback.

Scenario : If a business scenario fails the transaction gets rolledback.

Conisder this code.

---------generatePolicy() // remote where the transaction starts.
-------------generatePolicy() // local EJB
------------------ generatePolicy() // DAO opens and closes connection.
------------------ generateFollowUp() // DAO opens and closes connection.
------------------ updateProspect() // DAO opens and cloese connection.

if the updateProspect() method fails the transaction should get rolledback, but if the connection is closed and returned to the pool in the previous methods, will the JTS require that specific connection to rollback
the operation carried out on that connection.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!