Atomikos Forum |
|
I am trying to migrate from jpaTransactionManager to jtaTransactionManager using atomikos in a spring project.
When i use atomikosDataSourceBean with jdbc properties everything is fine. But when i want to use glassfish jndi resource i got the exception below Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.sun.gjc.spi.jdbc40.DataSource40] to required type [javax.sql.XADataSource] for property 'xaDataSource': no matching editors or conversion strategy found I configure atomikosDataSourceBean as <bean id="dataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close"> <property name="xaDataSource" ref="jpaDatasource"/> </bean> jpaDatasource is configured with com.mysql.jdbc.jdbc2.optional.MysqlXADataSource Any help is appreciated
My datasource configuration is below.
<jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" res-type="javax.sql.XADataSource" allow-non-component-callers="true" name="jdbc/sparrowPool"> <property name="URL" value="jdbc:mysql://localhost:3306/deveopment"></property> <property name="Password" value="123456"></property> <property name="User" value="root"></property> <property name="pinGlobalTxToPhysicalConnection" value="true"></property> </jdbc-connection-pool> |