Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-324

Enable Setting Port with com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 4.4.CR1
    • 4.2.3.SP5
    • Recovery
    • None

      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 ...)

              rhn-engineering-mmusgrov Michael Musgrove
              krieger_thomas Thomas Krieger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: