]
RH Bugzilla Integration commented on JBJCA-1181:
------------------------------------------------
Martin Simka <msimka(a)redhat.com> changed the Status of [bug
Recovery is not run for XA datasource which does not define password
under <security>
-------------------------------------------------------------------------------------
Key: JBJCA-1181
URL:
https://issues.jboss.org/browse/JBJCA-1181
Project: IronJacamar
Issue Type: Bug
Components: Deployer
Affects Versions: 1.0.26.Final, 1.1.6.Final, 1.2.0.Beta2
Reporter: Ondřej Chaloupka
Assignee: Jesper Pedersen
Fix For: 1.0.27.Final, 1.2.0.Beta4
Attachments: server.log
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:
{code}
<security>
<user-name>crashrec</user-name>
</security>
{code}
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
{code}
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
{code}
Whole configuration of xa-datasource used:
{code}
<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>
{code}