Blacktie : problem with transaction and xa datasource
gleysour Mar 27, 2014 10:58 AMHello,
I currently conducting a proof of concept to replace a part of our information system based on Oracle/Tuxedo with Narayana/Blacktie.
First of all, thanks to Tom Jenkinson for it's great work to offer an open source replacement of the product tuxedo.
Actually I am facing a strange case (maybe a bug) when using a transaction against an xa datasource
Here the context :
one server process with services and connect to an xa datasource (server works with the context datasource to issue direct sql via oci)
one client process with call service, begin/commit transaction
1) When the transaction is begin/commit by the server (same process) everyhing is OK
2) When the transaction is begin/commit since the client it failed.
When i debug the problem seems to be in "HttpTxManager::enlist" method
The httpTx->enlistUrl() return NULL then the variable recUrl is not properly initialized.
And as this variable char *recUrl is not initialize to NULL it try to "Enlisted branch" which a dirty default value.
The log :
case 1)
TxHttpTxManager :127 ) - GWL : enlist methode begin
TxHttpTxManager :130 ) - GWL : enlist methode guard isOpen TX_OK
TxHttpTxManager :136 ) - GWL : enlist methode recup pointer enlisturl avant
TxHttpTxManager :138 ) - GWL : enlist methode recup pointer enlisturl apres
TxHttpTxManager :141 ) - GWL : enlist methode enlisturl NOT NULL
TxHttpTxManager :179 ) - GWL : enlist methode recUrl
TxHttpTxManager :183 ) - Enlisted branch 131077%3a120%3a1%3a1%3a24%3a534136 rec url: http://172.20.20.122:8080/rest-at-coordinator/tx/recovery-coordinator/0_ffffac14147a_77a9c193_53330072_1a/0_ffffac14147a_77a9c193_53330072_1b
and everything goes ok
case 2)
TxHttpTxManager :127 ) - GWL : enlist methode begin
TxHttpTxManager :130 ) - GWL : enlist methode guard isOpen TX_OK
TxHttpTxManager :136 ) - GWL : enlist methode recup pointer enlisturl avant
TxHttpTxManager :138 ) - GWL : enlist methode recup pointer enlisturl apres
TxHttpTxManager :176 ) - GWL : enlist methode enlisturl NULL donc recUrl = NULL (or default value on stack ?)
TxHttpTxManager :179 ) - GWL : enlist methode recUrl
TxHttpTxManager :183 ) - Enlisted branch 131077%3a120%3a1%3a2%3a49%3a419249 rec url: XAWrapper::XAWrapper(XABranchNotification*, XID&, long int, xa_switch_t*, XARecoveryLog&, const char*)
and the transaction failed.
My conclusion, it seems that fully information transaction is not transmitted between distinct process ...
i don't know if it is a real bug, so i begin with the forum
Any help would be appreciated to focus arround this problem
Best regards,
Gwenael Leysour
Environnement :
CentOS 6.5
Wildfly-8.0.0.CR1 / Narayana-5.0.0.Final
Blacktie compile in 32 bits (with third-parties include in distrib CentOS : log4cxx-0.10.0-13, xerces-c-3.0.1-20, apr-1.3.9-5)
Oracle 11.2.0
Applications in 32 bits
PS : sorry for my broken English