Atomikos Forum

AtomikosSQLException: error borrowing connection

Hi,

When i have 13 records to be inserted/updated in XA2 (per configuration below) and XA3 from XA1 then it throws "AtomikosSQLException: error borrowing connection". This exception shows up with the poolSize of 10 to 30. However, with the pool size of 100 it works fine.

When i have 3 records to be inserted in XA2  and XA3 from XA1 then poolSize of even 10 works.

Few times i even saw "com.atomikos.datasource.pool.CreateConnectionException: ConnectionPool: connection pool is still empty after waiting for 30 secs".

Am i missing any configuration?

Thank you,
Hiren


 <!-- Construct Atomikos UserTransactionManager START-->
    <bean id="AtomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" >
         
      <!--  when close is called, should we force transactions to terminate or not? -->
      <property name="forceShutdown" value="false" />
      <!--  <property name="startupTransactionService" value="true" />  -->         
    </bean>
    
    <!-- Also use Atomikos UserTransactionImp, needed to configure Spring  -->
    <bean id="AtomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
      <property name="transactionTimeout" value="300" />     
    </bean>
    
    <!-- Configure the Spring framework to use JTA transactions from Atomikos -->
    <bean id="JtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
      <property name="transactionManager" ref="AtomikosTransactionManager" />
      <property name="userTransaction" ref="AtomikosUserTransaction" />     
      <property name="transactionSynchronization" value="2" />
    </bean>
    
    <bean id="xaDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean">
        <property name="uniqueResourceName"><value>XA1</value></property>
        <property name="xaDataSourceClassName" value="oracle.jdbc.xa.client.OracleXADataSource" />
        <property name="xaProperties">         
            <props>         
                <prop key="URL">jdbc:oracle:thin:@dbtest:1521:development</prop>
                <prop key="user">ABC</prop>
                <prop key="password">ABC</prop>
            </props>
        </property>
        <property name="poolSize"><value>10</value></property>     
    </bean>

    <bean id="xaDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean">
        <property name="uniqueResourceName"><value>XA2</value></property>
        <property name="xaDataSourceClassName" value="oracle.jdbc.xa.client.OracleXADataSource" />
        <property name="xaProperties">         
            <props>         
            <prop key="URL">jdbc:oracle:thin:@dbtest:1521:development</prop>
            <prop key="user">XYZ</prop>
            <prop key="password">XYZ</prop>
            </props>
        </property>
        <property name="poolSize"><value>10</value></property>     
    </bean>

    <bean id="xaDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean">
        <property name="uniqueResourceName"><value>XA2</value></property>
        <property name="xaDataSourceClassName" value="oracle.jdbc.xa.client.OracleXADataSource" />
        <property name="xaProperties">         
            <props>         
            <prop key="URL">jdbc:oracle:thin:@dbtest:1521:development</prop>
            <prop key="user">PQR</prop>
            <prop key="password">PQR</prop>
            </props>
        </property>
        <property name="poolSize"><value>10</value></property>     
    </bean>
springforever Send private email
Monday, October 20, 2008
 
 
Do i have to use "<!-- init-method="init" destroy-method="close" -->" with AtomikosTransactionManager bean to make the connection pool active?

I tried with this but it still does not work.
springforever Send private email
Monday, October 20, 2008
 
 
Did you try with release 3.4?

Thanks
Guy Pardon Send private email
Friday, October 24, 2008
 
 
Thank you.It works with 3.4.0.
springforever Send private email
Wednesday, October 29, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics