On Feb 22, 2013, at 2:38 PM, Jason Greene <jason.greene(a)redhat.com> wrote:
Well the problem is TX boundaries typically are the lifespan of the request, so the
application thread would never fully give up control. The only thing you can really
without relying on checks, or deferring to the db/tm, is to interrupt the application
thread from the sync thread. However the EntityManager would have to be carefully coded to
process thread interruption in a way that distinguishes between tx timeout and user
requested interrupt. It's probably the same amount of code either way.
Actually that's not a good idea, because you have no idea if the application thread is
still executing the entity manager.
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat