Created
September 19, 2015 12:44
-
-
Save mbechler/4be88aaa3d350a91db8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- com/atomikos/datasource/xa/XAResourceTransaction.java 2014-03-23 09:14:10.000000000 +0100 | |
+++ com/atomikos/datasource/xa/XAResourceTransaction.java 2015-09-18 14:13:53.810419822 +0200 | |
@@ -465,7 +465,7 @@ | |
boolean recovered = false; | |
// perform extra initialization | |
- if (beforePrepare()) { | |
+ if (getXAResource() != null && beforePrepare()) { | |
// see case 23364: recovery before prepare should do nothing | |
// and certainly not reset the xaresource | |
return false; | |
@@ -860,7 +860,7 @@ | |
// enlist/delist on different xaresource instances. | |
// This should not interfere with recovery since a recovered | |
// instance will NOT have state ACTIVE... | |
- if (!TxState.ACTIVE.equals(this.state)) { | |
+ if (this.xaresource == null || !TxState.ACTIVE.equals(this.state)) { | |
setXAResource(xaresource); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment