-
Bug
-
Resolution: Done
-
Major
-
1.0.26.Final, 1.1.6.Final, 1.2.0.Beta2
-
None
If you do not define password for xa datsource then recovery does not run despite the fact that there is no need of password for connection to database.
When you define just:
<security> <user-name>crashrec</user-name> </security>
and database is set to not require password - e.g. for postgres
vim /var/lib/pgsql/data/pg_hba.conf
you define connection with 'trust'
host all all 127.0.0.1/32 trust
Then you will experience WARNING message during recovery and recovery itself on the xa datasource is not run
10:12:58,137 WARN [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000904: No security domain defined for crash recovery: java:jboss/xa-datasources/CrashRecoveryDS 10:12:58,138 WARN [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000905: Subject for crash recovery was null: java:jboss/xa-datasources/CrashRecoveryDS
Whole configuration of xa-datasource used:
<xa-datasource jndi-name="java:jboss/xa-datasources/CrashRecoveryDS" pool-name="CrashRecoveryDS" enabled="true" use-java-context="true"> <xa-datasource-property name="DatabaseName">crashrec</xa-datasource-property> <xa-datasource-property name="PortNumber">5432</xa-datasource-property> <xa-datasource-property name="ServerName">127.0.0.1</xa-datasource-property> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> <driver>postgres</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <xa-pool> <min-pool-size>5</min-pool-size> <max-pool-size>50</max-pool-size> </xa-pool> <security> <user-name>crashrec</user-name> </security> <recovery> <!-- <recover-credential> <user-name>crashrec</user-name> </recover-credential> --> </recovery> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/> </validation> <timeout> <blocking-timeout-millis>30000</blocking-timeout-millis> <idle-timeout-minutes>15</idle-timeout-minutes> </timeout> <statement> <prepared-statement-cache-size>75</prepared-statement-cache-size> </statement> </xa-datasource>