You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "PREVOSTO, Laurent" <la...@sfr.com> on 2010/08/13 01:04:11 UTC

JackRabbit DS should be XA or unmanaged ?

Hi,
i am still struggling with my JCR-2679 problem :

Basically, sometimes, th BundlePM won't be able to reconnect to the database and as it is in a synchronized method, the whole webapp gets stuck :-(

After browsing through docs and forums, i am really confused by the desired configuration of the JackRabbit DS :

it looks like the BundlePM manages its own JDBC connection, hence the JackRabbit DS should not be managed by JBOSS.

Today, our JackRabbit DS looks like :


<xa-datasource>
                <jndi-name>jdbc/sadirah</jndi-name>
                <track-connection-by-tx />
                <isSameRM-override-value>false</isSameRM-override-value>
                <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                <xa-datasource-property name="URL">jdbc:oracle:thin:@fubar</xa-datasource-property>
                <xa-datasource-property name="User">xxxx</xa-datasource-property>
                <xa-datasource-property name="Password">yyyyy</xa-datasource-property>
                <!--
                        Uses the pingDatabase method to check a connection is still valid
                        before handing it out from the pool
                -->
                <!--
                        valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnec
tionChecker</valid-connection-checker-class-name
                -->
                <!-- Checks the Oracle error codes and messages for fatal errors -->
                <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception
-sorter-class-name>
                <!--
                        Oracles XA datasource cannot reuse a connection outside a transaction
                        once enlisted in a global transaction and vice-versa
                -->
                <no-tx-separate-pools />
                <!--
                        corresponding type-mapping in the standardjbosscmp-jdbc.xml
                        (optional)
                -->
                <metadata>
                        <type-mapping>Oracle9i</type-mapping>
                </metadata>
                <min-pool-size>1</min-pool-size>
                <max-pool-size>40</max-pool-size>
                <!--<check-valid-connection-sql>SELECT user FROM dual</check-valid-connection-sql>-->
        </xa-datasource>


But some people tend to say that the JackRabbit DS should be unnmanaged (<no-tx-datasource/>) as in JCR-1349

What is the good way of configuring the JackRabbit DS ?

Regards,

Laurent