[jbossts-issues] [JBoss JIRA] (JBTM-2190) Recovery is not run for XA datasources that does not define password under <security>

Ondřej Chaloupka (JIRA) issues at jboss.org
Wed Jun 11 04:53:16 EDT 2014


Ondřej Chaloupka created JBTM-2190:
--------------------------------------

             Summary: Recovery is not run for XA datasources that does not define password under <security>
                 Key: JBTM-2190
                 URL: https://issues.jboss.org/browse/JBTM-2190
             Project: JBoss Transaction Manager
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: Recovery
    Affects Versions: 5.0.2, 4.17.20
            Reporter: Ondřej Chaloupka
            Assignee: Tom Jenkinson


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}



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)



More information about the jbossts-issues mailing list