Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-1183

XA connections leak in XARecoveryModule

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Rejected
    • 4.16.4
    • None
    • Documentation, Recovery
    • None
    • Hide

      Register a PostgreSQL XA datasource in JBoss configuration XML. Then create two heap dumps with interval > 2 minutes, XARecoveryModule._xidScans will grow without any limits.

      <xa-datasource jndi-name="java:/datasources/Test" pool-name="Test" enabled="true" use-ccm="false">
        <xa-datasource-property name="ServerName">server</xa-datasource-property>
        <xa-datasource-property name="DatabaseName">database</xa-datasource-property>
        <driver>postgresql</driver>
        <xa-pool>
          <is-same-rm-override>false</is-same-rm-override>
          <interleaving>false</interleaving>
          <pad-xid>false</pad-xid>
          <wrap-xa-resource>false</wrap-xa-resource>
        </xa-pool>
        <security>
          <user-name>user</user-name>
          <password>password</password>
        </security>
        <validation>
          <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
          <validate-on-match>false</validate-on-match>
          <background-validation>false</background-validation>
          <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
        </validation>
        <statement>
          <share-prepared-statements>false</share-prepared-statements>
        </statement>
      </xa-datasource>
      
      Show
      Register a PostgreSQL XA datasource in JBoss configuration XML. Then create two heap dumps with interval > 2 minutes, XARecoveryModule._xidScans will grow without any limits. <xa-datasource jndi-name= "java:/datasources/Test" pool-name= "Test" enabled= " true " use-ccm= " false " > <xa-datasource-property name= "ServerName" >server</xa-datasource-property> <xa-datasource-property name= "DatabaseName" >database</xa-datasource-property> <driver>postgresql</driver> <xa-pool> <is-same-rm-override> false </is-same-rm-override> <interleaving> false </interleaving> <pad-xid> false </pad-xid> <wrap-xa-resource> false </wrap-xa-resource> </xa-pool> <security> <user-name>user</user-name> <password>password</password> </security> <validation> <valid-connection-checker class- name= "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker" /> <validate-on-match> false </validate-on-match> <background-validation> false </background-validation> <exception-sorter class- name= "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter" /> </validation> <statement> <share-prepared-statements> false </share-prepared-statements> </statement> </xa-datasource>
    • Hide

      Add recovery-plugin tag to the datasource configuration.

      Show
      Add recovery-plugin tag to the datasource configuration.

    Description

      XARecoveryModule._xidScans accumulates XA connections if JDBC driver does not implement Connection.isValid(int timeout) method or if isValid returns false. It's the case for PostgreSQL JDBC driver.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-mmusgrov Michael Musgrove
              hipa_jira v a (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: