Mule フローでは、XA トランザクション用の XA データソースを次のように構成し、jboss トランザクション管理も構成しました。
<jbossts:transaction-manager doc:name="Transaction Manager">
<property key="com.arjuna.ats.arjuna.coordinator.defaultTimeout"
value="3000" />
<property key="com.arjuna.ats.arjuna.coordinator.txReaperTimeout"
value="300000" />
</jbossts:transaction-manager>
<spring:beans>
<spring:bean id="mySqlXADataSource" name="MySqlXADataSource"
class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
<spring:property name="user" value="${ftp.db.user}" />
<spring:property name="password" value="${ftp.db.password}" />
<spring:property name="url"
value="${ftp.db.url}" />
</spring:bean>
</spring:beans>
<jdbc-ee:connector name="FTPDatabase" dataSource-ref="mySqlXADataSource"
validateConnections="true" queryTimeout="-1" pollingFrequency="0"
doc:name="Database">
<reconnect blocking="false" frequency="10000" count="3" />
</jdbc-ee:connector>
しかし、実行時に次の例外に直面しています
Exception stack is:
1. null source (java.lang.IllegalArgumentException)
java.util.EventObject:56 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jdbc://FetchFTPConfig, connector=EEJdbcConnector
{
name=FTPDatabase
lifecycle=start
this=3dbe005a
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=false
connected=true
supportedProtocols=[jdbc]
serviceOverrides=<none>
}
, name='endpoint.jdbc.FetchFTPConfig', mep=REQUEST_RESPONSE, properties={queryTimeout=-1, queries=merged: {FetchFTPConfig=SELECT SRC.C_BSF_ACKNWLDGMNT AS C_BSF_ACKNWLDGMNT, FTP.C_BFA_IPADDR AS C_BFA_IPADDR, FTP.C_BFA_PORT AS C_BFA_PORT, FTP.C_BFA_OWNR AS C_BFA_OWNR, FTP.C_BFA_PATH AS C_BFA_PATH, FTP.C_BFA_PSSWRD AS C_BFA_PSSWRD, FTP.C_BFA_USRNM AS C_BFA_USRNM,SRC.C_BSF_FILE_TYPE_ID AS C_BSF_FILE_TYPE_ID from T_BMRS_SRC_FILES AS SRC,T_BMRS_FILETYPE AS FTYPE,T_BMRS_FTP_ACCNTS FTP where SRC.C_BSF_FILE_TYPE_ID=FTYPE.C_BFT_ID and FTYPE.C_BFT_BFA_KEY=FTP.C_BFA_KEY and SRC.C_BSF_FILE_UNIQUEID=#[flowVars.FileId];}}, transactionConfig=Transaction{factory=org.mule.transaction.XaTransactionFactory@3726423c, action=BEGIN_OR_JOIN, timeout=30000}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: NotifyESBRequest (org.mule.api.transport.DispatchException)
org.mule.transport.AbstractMessageDispatcher:105 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:56)
at javax.sql.StatementEvent.<init>(StatementEvent.java:64)
at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
私が使用しているMysqlコネクタはmysql-connector-java-5.1.36 jarです。