I recently implemented the "Last Resource Gambit" in jboss4's transaction manager.
Perhaps you would like to download the latest jboss4 and help me test it?
It will make it into 3.2.4 once it has been tested.
It avoids the prepare on the local resource and rollsback the
XA resources if the local resource fails to commit.
// Done after all XA resources prepare and vote ok
JDBC commit(); -If it fails rollback XA resources
Without a prepare on the local resource, you don't get that annoying message.
Of course if there are two local resources you still have a problem.
I guess I will be able to do some simple tests, but I wouldn't have the time or inclination to port over our app to JBoss 4. I just upgraded to 3.2.3.