[GLASSFISH-20926] Exception during commit of LAO resources not controllable Created: 12/Dec/13  Updated: 12/Dec/13

Status: Open
Project: glassfish
Component/s: jts
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: morphace Assignee: paul_parkinson
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Embedded Glassfish v. 4.0



 Description   

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).
This in turn leaves the whole global transaction in a broken state.

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.
If the LAO resource's LocalTransaction throws any other exception than a XAException, the process would remain as it is today.

I could provide this quite simple modification, if you want me to.


Generated at Wed Sep 28 06:51:00 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.