xapool + Sybase + JMS + Spring + Mule (q2db example) Query
Dear Nabblers,
Does anyone have a successful implementation of MQ to Sybase problem using xapool? We thought we did until we traced that on Sybase level xapool actually creates local transactions. I believe the problem is with the xapool implementation. Any ideas would be more than welcome.
We are using 1.4.4 version of Mule and 1.6 Beta of xapool.
I am including all the relevant parts of Mule and Spring config:
<SPRING>
<bean id="standardXAPoolDataSource" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"
destroy-method="stopPool">
<property name="transactionManager" ref="jbosstm"/>
<property name="dataSource">
<bean class="org.enhydra.jdbc.standard.StandardXADataSource">
<property name="transactionManager" ref="jbosstm"/>
<property name="driverName" value="com.sybase.jdbc3.jdbc.SybXADataSource"/>
<property name="url" value="jdbc:sybase:Tds:<hostname>:<port>/<databasename>" />
<property name="user" value="username" />
<property name="password" value="password" />
</bean>
<property name="user" value="username" />
<property name="password" value="password" />
<property name="maxSize" value="<maxsizenum>" />
<property name="minSize" value="<minsizenum>" />
</bean>
<MULE>
<connector name="dbConnector" className="org.mule.providers.jdbc.JdbcConnector">
<properties>
<!-- This property references the Spring container -->
<container-property name="dataSource" reference="standardXAPoolDataSource"/>
<map name="queries">
<property name="insert1"
value="INSERT INTO ..."/>
<property name="insert2"
value="INSERT INTO ..." />
</map>
</properties>
<exception-strategy ...
</exception-strategy>
</connector>
<model name="model" type="inherited">
<mule-descriptor name="InsertComponent"
implementation="org.mule.components.simple.BridgeComponent">
<inbound-router>
<endpoint address="jms://<inputqueuename>" connector="jmsConnector"
transformers="..."
responseTransformers="NullTransformer">
<transaction action="ALWAYS_BEGIN"
factory="org.mule.transaction.XaTransactionFactory" />
</endpoint>
</inbound-router>
<outbound-router matchAll="true">
<router className="com.rabo.si.mule.patch.TransactionJoiningRouter">
<endpoint address="jdbc://insert1"
transformers="...">
<transaction action="ALWAYS_JOIN"
factory="org.mule.transaction.XaTransactionFactory" />
</endpoint>
<endpoint address="jdbc://insert2"
transformers="...">
<transaction action="ALWAYS_JOIN"
factory="org.mule.transaction.XaTransactionFactory" />
</endpoint>
<transaction action="ALWAYS_JOIN"
factory="org.mule.transaction.XaTransactionFactory" />
</router>
</outbound-router>
</mule-descriptor>
</model>
Thanks in advance,
Leon.