1 Reply Latest reply on May 14, 2018 8:41 AM by Virendra Rathore

    How to configure prepared-statement-cache-size in a XA DataSource with IJ Embedded ?

    Alexis Hassler Apprentice

      Hi,

       

      I'm using IronJacamar embedded, with XA Datasource. I want to setup the prepared statement cache, but the configuration is not used.

       

      I'm configuring it just like a non-XA datasource :

       

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:noNamespaceSchemaLocation="http://www.jboss.org/ironjacamar/schema/datasources_1_1.xsd">
          <xa-datasource jndi-name="java:/H2DS" pool-name="H2DS">
              <xa-datasource-property name="url">jdbc:h2:tcp://localhost/./db</xa-datasource-property>
              <!--<xa-datasource-property name="User">${archi.embedded.ds.User}</xa-datasource-property>-->
              <!--<xa-datasource-property name="Password">${archi.embedded.ds.Password}</xa-datasource-property>-->
              <!--<xa-datasource-property name="DriverType">org.h2.Driver</xa-datasource-property>-->
              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
              <xa-pool>
                  <initial-pool-size>3</initial-pool-size>
                  <min-pool-size>5</min-pool-size>
                  <max-pool-size>7</max-pool-size>
                  <!--<is-same-rm>false</is-same-rm>-->
                  <no-tx-separate-pools />
              </xa-pool>
              <timeout>
                  <idle-timeout-minutes>11</idle-timeout-minutes>
              </timeout>
              <statement>
                  <prepared-statement-cache-size>13</prepared-statement-cache-size>
              </statement>
              <validation>
                  <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.novendor.JDBC4ValidConnectionChecker"/>
              </validation>
          </xa-datasource>
      </datasources>
      
      

       

      The <valid-connection-checker> is not used as well.

       

      Here is a small project that reproduce my problem : Alexis Hassler / sw-ijembed · GitLab , and I've added a CI job : Jobs · Alexis Hassler / sw-ijembed · GitLab .

       

      Is there a dedicated configuration for XA Datasource ?

       

      Thanks,

       

      Alexis

       

      (I've opened an issue : [JBJCA-1359] Missing configuration elements in the XA DataSources - JBoss Issue Tracker )