« Return to Thread: xapool + Sybase + JMS + Spring + Mule (q2db example) Query
Hi,
If I can make a suggestion, try c3p0 pool (c3p0-0.9.1.2.jar)
(http://sourceforge.net/projects/c3p0#item3rd-1)
example from "spring.application.context.xml"
------------------------------------------------------------------------------------
<bean id="SourceDataStore.01" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass"><value>${jdbc.driverClassName}</value></property>
<property name="jdbcUrl"><value>${jdbc.url}</value></property>
<property name="user"><value>${jdbc.username}</value></property>
<property name="password"><value>${jdbc.password}</value></property>
<property name="initialPoolSize" value="1"/>
<property name="minPoolSize" value="1"/>
<property name="maxPoolSize" value="8"/>
<property name="acquireIncrement" value="1"/>
<property name="maxStatements" value="40"/>
<!-- Configuring Recovery From Database Outages -->
<property name="acquireRetryAttempts" value="100"/>
<property name="acquireRetryDelay" value="5000"/>
<property name="breakAfterAcquireFailure" value="true"/>
</bean>
------------------------------------------------------------------------------------
I have a question for you,
how do you handle sybase deadlocks in your MULE integration?
Let me know, if c3p0 works for you,
GKMad Russian wrote: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.
« Return to Thread: xapool + Sybase + JMS + Spring + Mule (q2db example) Query
| Free embeddable forum powered by Nabble | Forum Help |