Atomikos Forum

Atomikos Transaction manager with BoneCPDataSource spring

I have already configured BoneCPDataSource bean in spring xml and I want to use atomikos transaction manager but it seems it doesn't work with spring @transactional annotation. it should rollback but it deosn't rollback.

is it possible or suitable to use different datasource with atomikos transaction manager in spring framework.


transaction manager configuration

    <bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init"
          destroy-method="close">
        <!--
              when close is called, should we force
              transactions to terminate or not?
        -->
        <property name="forceShutdown" value="false"/>
    </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="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="transactionManager" ref="atomikosTransactionManager"/>
        <property name="userTransaction" ref="atomikosUserTransaction"/>
    </bean>


datasource configuration

    <bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
        destroy-method="close">
        <property name="driverClass" value="${dataSource.driverClass}" />
        <property name="jdbcUrl" value="${dataSource.jdbcUrl}" />
        <property name="username" value="${dataSource.username}" />
        <property name="password" value="${dataSource.password}" />
        <property name="idleConnectionTestPeriodInMinutes" value="60" />
        <property name="idleMaxAgeInMinutes" value="240" />
        <property name="maxConnectionsPerPartition" value="${dataSource.maxConnections}" />
        <property name="minConnectionsPerPartition" value="${dataSource.minConnections}" />
        <property name="partitionCount" value="3" />
        <property name="acquireIncrement" value="5" />
        <property name="statementsCacheSize" value="100" />
        <property name="releaseHelperThreads" value="3" />
        <property name="connectionTimeoutInMs" value="${dataSource.connectionTimeoutInMs}"></property>
    </bean>
dogukan Send private email
Friday, February 15, 2013
 
 

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

Other recent topics Other recent topics