« Return to Thread: help with jdbc transaction
Andrew,
The XADataSource:
<bean
name="fdcsJdbcDataSource"
class="oracle.jdbc.xa.client.OracleXADataSource">
<property
name="URL" value="${fdcs.database.url}"/>
<property
name="user" value="${fdcs.database.usr}"/>
<property
name="password" value="${fdcs.database.pwd}"/>
</bean>
The JDBC connector:
<connector
name="jdbcFdcsConnectorXA"
className="org.mule.providers.jdbc.JdbcConnector">
<properties>
<container-property
name="dataSource" reference="fdcsJdbcDataSource"
required="true"/>
<map
name="queries">
<property
name="recordWorkIssued" value=
"INSERT
INTO workissued (workorderno, districtcode, issueddate, workgroupcode,
sourcefilename)
VALUES
(${DFM_WORKORDER}, ${DFM_DISTRICT_CODE}, to_number(to_char(sysdate, 'YYYYMMDD')),
${DFM_WORKGROUPS},
${originalFilename})"/>
</map>
</properties>
<connection-strategy
className="org.mule.providers.SimpleRetryConnectionStrategy">
<properties>
<property
name="doThreading" value="true"/>
<property
name="retryCount" value="-1"/>
<property
name="frequency" value="10000"/>
</properties>
</connection-strategy>
</connector>
The endpoint:
<endpoint
name="recordWorkIssued" address="jdbc://recordWorkIssued"
connector="jdbcFdcsConnectorXA"/>
The UMO (the above endpoint is called
using UMOEventContext.sendEvent(UMOMessage, UMOEndpoint) depending on logic in
the implementation class):
<mule-descriptor
name="DFMDispatcherUMO"
implementation="ellipseFdcsDispatcher"
singleton="false"
initialState="started">
<inbound-router>
<endpoint
address="dispatcherInput" connector="jmsInternalXA"
synchronous="true">
<transaction
action="ALWAYS_BEGIN"
factory="org.mule.transaction.XaTransactionFactory"/>
</endpoint>
</inbound-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint
address="jms://queue.afaria.fdcs-workpack-xml"
connector="jmsAfariaConnector"
transformers="DFMMessageToPayloadBytes
BytesToString ObjectToJMSMessage"
synchronous="true"/>
</router>
</outbound-router>
<interceptor
name="DFMInterceptorStackXA"/>
<exception-strategy
className="com.amtsybex.dfm.mule.ForwardingComponentExceptionStrategy">
<global-endpoint
name="dfmAuditInterceptorXA" transformers="DFMMessageToAuditXML
ObjectToJMSMessage"/>
</exception-strategy>
</mule-descriptor>
From: Andrew
Perepelytsya [mailto:aperepel@...]
Sent: 07 March 2007 16:28
To: user@...
Subject: Re: [mule-user] help with
jdbc transaction
****** This Message Originated From The Internet Please Be
Aware Of Suspicious Attachments And Content ******
Stephen,
Could you please describe the following details? The mule-descriptors having
your jdbc endpoints, where were jdbc ones configured (inbound/outbound), what
transaction attributes?
Andrew
On 3/7/07, Stephen
Magee <Stephen_Magee@...>
wrote:
Andrew,
Due to current pressures I won't have a chance to put up an
example config until next week, but in the mean time:
We have a UMO that takes a message of an ActiveMQ queue,
updates a database and then publishes to another ActiveMQ queue all within a XA
transaction (note that the queues are on separate brokers).
Without the changes that we have made we got a lot of XA
errors and on stepping through the code noticed that the database was updated
as soon as the insert/update was executed (i.e. before the message had been
forwarded to the outbound queue).
We have had no problems with another part of the system that
bridges the two remote ActiveMQ brokers in a XA transaction i.e. we only
encountered the problem when a JDBC connection was involved.
We're using Mule 1.3.2 with ActiveMQ, Oracle 10g and the Oracle
JDBC driver. Mule is running standalone and using JOTM as the transaction
manager.
Stephen
« Return to Thread: help with jdbc transaction
| Free embeddable forum powered by Nabble | Forum Help |