When the Liberty profile transaction manager recovers indoubt database transactions, it uses either the unique identifier or the JNDI name to locate the current dataSource element, and then determines the user ID and password to use for recovery.
Configure a data source by specifying the attributes of the dataSource element in the server.xml configuration file. You can assign a unique identifier or a jndiName attribute for the data source as follows:
<dataSource id="ds1" jndiName="jdbc/ds1"... />
You must not change the value of the id or jndiName attribute when a recovery is pending for a transaction in which the data source participated. If you change any other attributes of the dataSource element, those changes are retained for the recovery. Therefore, you can, for example, add a recoveryAuthDataRef attribute that specifies a database user ID and password to use for recovery.
<authData id="recoveryAuth" user="dbuser1" password="{xor}Oz0vKDtu"/>
<dataSource id="ds1" jndiName="jdbc/ds1" jdbcDriverRef="DB2"
recoveryAuthDataRef="recoveryAuth" .../>
<resource-ref name="jdbc/ds1ref" binding-name="jdbc/ds1">
<authentication-alias name="user1Auth"/>
</resource-ref>
<authData id="user1Auth" user="dbuser1" password="{xor}Oz0vKDtu"/>
<dataSource id="ds1" jndiName="jdbc/ds1" jdbcDriverRef="DB2" .../>
<dataSource id="ds1" jndiName="jdbc/ds1" jdbcDriverRef="DB2" ...>
<properties.db2.jcc databaseName="testdb" user="dbuser1" password="{xor}Oz0vKDtu"/>
</dataSource>