how to handle a branch rollback
When using distributed transactions there is a need to rollback a
branch of the transaction but commit the rest.
When I try this using the oracle drive I get:
ORA-02051: another session in same transaction failed
which happens because the entire transaction did not commit but
it should not need to only the non rolled back ones do.
here i my logic:
getxaconnection
getxaresource
create an xid
xaresource.start(xid)
// roll this back
getxaconnection
getxaresource
create an xid
xaresource.start(xid)
xaressource.end(xid)
xaresource.rollback(xid)
xaresource.end(xid)
xaresource.commit(xid)
the exception is thrown on the second earesource.end
ideas?