Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1181

Recovery is not run for XA datasource which does not define password under <security>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.27.Final, 1.2.0.Beta4
    • 1.0.26.Final, 1.1.6.Final, 1.2.0.Beta2
    • Deployer
    • 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&gt;org.postgresql.xa.PGXADataSource</xa-datasource-class&gt;
        <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>
      

              jpederse@redhat.com Jesper Pedersen
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: