[GLASSFISH-20926] Exception during commit of LAO resources not controllable Created: 12/Dec/13 Updated: 12/Dec/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Embedded Glassfish v. 4.0
Exceptions that occur during the commit of LAO resource's LocalTransaction are not controllable, because the thrown Exception is simply replaces by a specific XAException in ConnectorXAResource.
This makes it impossible for the calling app code to catch the exception that was the cause for the failed commit and to react accordingly.
Moreover, the LAO resource might want to vote for a rollback of the whole global transaction, which is not possible today (the exception is replaced by an INTERNAL later on that doesn't lead to a rollback as far as I understood the code).
My suggestion would be to allow the LAO resource's LocalTransaction to rethrow an XAException with the right errorCode that would not be replaced inside ConnectorXAResource, but just thrown.
I could provide this quite simple modification, if you want me to.