Tom,
I'm not at all sure, but I suspect we're thinking about different problems, or at
least approaching them from different perspectives.
I'm not sure, but I suspect this is the context for the scenario Bill originally
described. If not, I am guilty of 3rd degree thread-hijacking ;-)
An application has a set of preexisting EJBs (or other analogous components). These use
CMT with a REQUIRED transaction attribute, so that multiple EJB calls can share a
transaction. The EJB's frequently throw and setRollbackOnly(), most frequently
because of gross concurrency issues. As an example, think of trying to reserve a seat on
an airplane, but someone else got the last seat just before you clicked.
Now imagine a business process that tries to explicitly model the failure recovery in this
case, either using exception handlers or anything else that can be expressed in JPDL.
How would you make the process model behave well, i.e., fairly WYSIWYG? Would you isolate
the business logic (calling these EJBs) in a separate transaction in the actionhandler, as
I was thinking?
I'm a little wary of trying to use fine-grained control of transactions (e.g.
inserting end/begin pairs via TransactionManager when exceptions occur), because we run in
multiple appservers (WebLogic, WebSphere, and now maybe JBoss) and I understand that they
tend to behave differently. If you think I'm making a mountain out of a molehill,
please say so - I'm just repeating hearsay!
I also suspect that in order to use TransactionManager, we'd need to avoid
participating in any surrounding CMT transaction - I'd think that the container would
freak out if we ended it's Container-Managed-Transaction and started another within a
CMT EJB. Do you have any experience with this?
-Ed Staub
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070577#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...