If you set
<property name="com.arjuna.ats.internal.arjuna.recovery.recoveryPort" value="1213"/>
<property name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort" value="1214"/>
you get the following Exception:
com.arjuna.ats.arjuna.exceptions.FatalError: [com.arjuna.ats.internal.arjuna.utils.SocketProcessId_2] - SocketProcessId.getpid could not get unique port.
at com.arjuna.ats.internal.arjuna.utils.SocketProcessId.getpid(SocketProcessId.java:122)
at com.arjuna.ats.arjuna.utils.Utility.getpid(Utility.java:206)
at com.arjuna.ats.arjuna.common.Uid.<init>(Uid.java:105)
at com.arjuna.ats.arjuna.utils.Utility.getProcessUid(Utility.java:218)
at com.arjuna.ats.internal.arjuna.recovery.TransactionStatusManagerItem.<init>(TransactionStatusManagerItem.java:323)
at com.arjuna.ats.internal.arjuna.recovery.TransactionStatusManagerItem.createAndSave(TransactionStatusManagerItem.java:71)
at com.arjuna.ats.arjuna.recovery.TransactionStatusManager.start(TransactionStatusManager.java:157)
at com.arjuna.ats.arjuna.recovery.TransactionStatusManager.<init>(TransactionStatusManager.java:78)
at com.arjuna.ats.arjuna.coordinator.TxControl.<clinit>(TxControl.java:312)
at com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService(TransactionManagerService.java:139)
The first problem is that in TransactionStatusManager calling ServerSocket socket = SocketProcessId.getSocket(); returns null, so that a new
ServerSocket is created in TransactionStatusManager getTsmServerSocket (int port) (line 218)
The solution is, to call (new SocketProcessId()).getpid(); in the constructor.
The second problem is that RecoveryManagerImple.activeRecoveryManager uses the wrong port (line 197):
SocketProcessId uses Property com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort and not com.arjuna.ats.internal.arjuna.recovery.recoveryPort.
Solution is to change activeRecoveryManager ().
Thomas Krieger
for P&I Team Tess (Ralph-Rainer Welzel, Andreas Rugullies ...)
- relates to
-
JBTM-348 decouple TransactionStatusManager from SocketProcessId
- Closed