activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drvillo <>
Subject JMS and JDBC local transactions?
Date Thu, 16 Nov 2006 16:09:41 GMT

I'm removing the whole XA support from my service, mainly because I don't
really need it (eventual inconsistent states are actually handled natively
by the service itself) and I have been encountering problems that I was

I had this problem finding the way to set up local transactions, so even if
I have something currently working I'm not sure wheter it makes sense and
how to improve it.

First of all to remove xa transaction support from jencks+activemq I have:

-modified the connection manager removing the transaction support
-removed the reference from the transaction manager in the JCAConnector
-created a separate pool for jdbc connections (with commons-pool) and
transacted their access through
a TransactionProxyFactoryBean.

A snippet of my beans definition file looks like the following then:

    <bean id="transactionContextManager"
    <bean id="geronimo"
    <bean id="transactionManager"
        <property name="userTransaction" ref="geronimo"/>

    <!-- Jencks Connection Manager -->
    <bean id="connectionManager"
        <property name="poolingSupport">
            <bean class="org.jencks.factory.SinglePoolFactoryBean">

    <bean id="jmsConnectionFactory"
        <property name="managedConnectionFactory"
        <property name="connectionManager" ref="connectionManager"/>

    <bean id="inboundConnectorStage1" class="org.jencks.JCAConnector">
        <property name="jcaContainer" ref="jencksJCAContainer"/>
        <property name="activationSpec">
            <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
                <property name="destination" value="stage1Queue"/>
                <property name="destinationType" value="javax.jms.Queue"/>
        <property name="ref" value="stage1"/>

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">

    <bean id="wdService"
        <property name="transactionManager">
            <ref bean="transactionManager"/>
        <property name="target">
            <ref bean="wdServiceTarget"/>
        <property name="transactionAttributes">
                <prop key="*">PROPAGATION_REQUIRED</prop>


My questions here is:
is there any way to get JDBC connections from the connection manager? I
don't quite know how I could wire this together. 
While Xa transactions seems to be on everybody's mouth around, there's
little to no documentation on how to 
get an efficient system with local transactions only...

Thanks everybody

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message