Skip to content

Instantly share code, notes, and snippets.

@mbechler
Created September 18, 2015 12:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbechler/37c4795a2057d2451b4e to your computer and use it in GitHub Desktop.
Save mbechler/37c4795a2057d2451b4e to your computer and use it in GitHub Desktop.
Atomikos read-only coordinated transaction synchornizatin
--- com/atomikos/icatch/imp/CoordinatorImp.java 2014-01-20 23:28:36.000000000 +0100
+++ com/atomikos/icatch/imp/CoordinatorImp.java 2014-10-22 16:18:51.939767075 +0200
@@ -969,8 +969,11 @@
} else {
int prepareResult = prepare ();
// make sure to only do commit if NOT read only
- if ( prepareResult != Participant.READ_ONLY )
+ if ( prepareResult != Participant.READ_ONLY ) {
commit ( false );
+ } else {
+ this.notifySynchronizationsAfterCompletion(TxState.TERMINATED);
+ }
}
} else {
rollback ();
@mnnayeck
Copy link

Hello,

did this patch fix the problem for you? I included this patch but I will get the issue

@mbechler
Copy link
Author

It's been quite a while since I used it (and atomikios), but, yes, back then it fixed some issues with unreleased resources using hibernate and JMS for me.

@mnnayeck
Copy link

Oh ok...well i implemented this patch but I still get the error. Need to keep looking :S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment