Recovering 1 XA resource manager(s) from the transaction partner logs

See Recovering from failed transaction recovery:

When WebSphere Application Server is running a transaction, the transaction information is written to the tranlog directory to log1 & log2. The resources required for that transaction (database name, user, password, etc) are recorded in the partnerlog directory to it's log1 & log2. When a transaction completes, the transaction information is garbage collected from the logs. If the application server should abend or be forced off mid-transaction, such that a transaction does not complete, then on subsequent server restarts, the transaction service detects the unfinished transaction and attempts to re-establish the resource(s) stored in the partnerlogs then complete the transaction(s) stored in the tranlogs.

A potential problem, especially with test servers, is when a required resource changes while the application server is down, for example the application server JVM was forced down so that a database password could be changed, or a database outage occurs, or for whatever reason, when the application server restarts, the resource no longer exist and you are now stuck in a state where the application server can no longer recover the unfinished transaction.

This situation is easy to spot, the error logged in the SystemOut.log will be an inability to establish the required resource, for example the database connection, with the transaction recovery manager code further down in the same error stack:

at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)

at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)

In cases where the logged transaction is of no concern, you can simply stop the application server, navigate to the tranlog and partnerlog directories and delete the contents (log1 & log2) of both directories, then restart the app server. On restart, new logs will be created by the transaction service (you can make a backup of these logs and store them elsewhere before deleting them from the application server folders if desired).