XA recovery

This topic describes the XA transaction and how it relates to the process of migrating messages.

Before you begin

For XA recovery to complete successfully:
  1. All the resources involved in the transaction need to be available to the transaction manager.
    Note: This is not a problem for the default messaging in Version 6, because it starts when the server (and the transaction manager) starts. However, the embedded messaging in Version 5 will not be informed that the server is starting and it is possible that recovery will not complete because the Version 5 messaging has not been started. The embedded queue manager will need to be started manually to allow XA recovery to complete.
  2. It is essential that the resources involved are started in the same way. The queue manager needs to be started using the same startup parameters, for example, the same TCP/IP port number as before.
    Note: When a transaction is in doubt, information about the resources is saved in the transaction log.

About this task

During migration, messages are removed from the WebSphere® Application Server Version 5 embedded messaging and put into the WebSphere Application Server Version 6 default messaging bus under an XA transaction. This ensures that the movement of a single message is carried out as a single unit of work even though there are two discrete and separate resources involved. The XA transaction uses two-phase commit, which ensures that all resources participating in a transaction are asked to "prepare" to commit and then, when all the resources have indicated they are ready, the transaction commits.

XA transactions are coordinated by a transaction manager which informs the resources to prepare, commit or roll back.

There is one XA transaction for each migrating message, and the controlling transaction manager is part of WebSphere Application Server Version 6 although you will probably be unaware that the transaction manager is involved.

It is possible for a transaction to be "in doubt". This can occur if the transaction manager has told the participants in a transaction to prepare and they have successfully done so, but an error has occurred when the final commit is attempted. This can be caused by a communications failure between the transaction manager and a transaction participant. If a transaction is in doubt, the transaction manager attempts to recover the transaction when the application server next restarts. The recovery process generally involves reconnecting to each of the participants and telling them to roll back the transaction.

When the message migration utility connects to the Version 5 embedded messaging server, it creates a log of the connection parameters that were used in your profile directory on the Version 6 server. For example, if the profile in use was "Profile1", then the log file would be located in the following directory:

user_data_root/profiles/Profile1/logs/message_migration_utility.log
, where user_data_root is the user information root directory for the installation of IBM® WebSphere Application Server.
Note: The log file contains details of every run of the utility. If you have run the utility more than once make sure that you go to the last entry.

Sample contents of the log file:

----------------------------------------------------------------
Migration Utility was started: Tue Feb 22 14:20:49 GMT 2005
----------------------------------------------------------------
   Browser details   : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 
Firefox/1.0
   Referrer          : null
   Query String      : null
   User              : your.server.name:9080
 
Connection to WebSphere Application Server Version 5 Embedded Messaging server was successful using the following 
properties:
 
   Queue Manager Name: WAS_Node01_server1
   Hostname          : your.server.name
   TCP/IP Port       : 21179
   SVRCONN Channel   : WAS.JMS.SVRCONN
 
Connection to WebSphere Application Server Version 6 default messaging provider was successful using the following 
properties:
 
   SIBus Name        : bus1
 
Message migration will take place using the following settings:
 
   Queues            : [queue2, queue1]
   Direction         : Version 5 -> Version 6
   V6 reliability    : ReliablePersistent

Procedure

  1. Start the Version 5 embedded messaging queue manager.
  2. Start the Version 6 application server, if it is not already started.

Results

XA recovery will continue automatically.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 6:03:36 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-iseries&topic=tjnmmuxa
File name: tjnmmuxa.html