yes, blocking end() should eliminate the race, at the cost of the rollback no longer
actually 'killing' a long running operation.
My concern with actually interrupting the business logic operation is related to the way
connections are multiplexed. You may have one or more logical connections on a single
TCP/IP connection. Killing the network level one may therefore kill unrelated business
operations in other threads. Depending how the multiplexing is implemented by the driver,
interrupting a logical connection handle may mess up the multiplexing, with much the same
undesirable side effects. Potentially you have to throw away the entire connection pool,
not just a single logical connection if you want to be safe.
Add to that the fact that the XA control messages probably flow over the same TCP/IP
connection and you wind up with a problem. Sure, presumed rollback means that the resource
manager should abort the tx when the TCP/IP connection drops, but some (db2?) don't.
You need to keep the connection intact if you want to be sure it gets terminated cleanly,
or rely on the crash recovery to tidy it up.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167107#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...