日期:2014-05-17  浏览次数:20851 次

JOTM配置难题,跪求懂JOTM大神来解决一下
各位大神,小弟最近配置分布式事务,打算采用JOTM来管理。在网上学习了一下,初步配置如下,结果出现了异常,望大大们指点小弟。。
XML code

<bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean"/>
 
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
          <property name="userTransaction"><ref local="jotm"/></property>
    </bean>
    
    <bean id="mysqlDataSource1" class="org.enhydra.jdbc.standard.StandardXADataSource" destroy-method="shutdown">
        <property name="transactionManager"><ref local="jotm"/></property>
        <property name="driverName"><value>com.mysql.jdbc.Driver</value></property>
        <property name="url"><value>jdbc:mysql://localhost:3306/emp_mvc</value></property>
        <property name="user" value="root"/>  
        <property name="password" value="123456"/> 
    </bean>
        
    <bean id="dataSource1" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource" destroy-method="shutdown">
        <property name="dataSource"><ref local="mysqlDataSource1"/></property>
        <property name="maxSize"><value>5</value></property>
        <property name="minSize"><value>2</value></property>
        <property name="user"><value>root</value></property>
        <property name="password"><value>123456</value></property>
    </bean>
    
    <bean id="mysqlDataSource2" class="org.enhydra.jdbc.standard.StandardXADataSource" destroy-method="shutdown">
        <property name="transactionManager"><ref local="jotm"/></property>
        <property name="driverName"><value>com.mysql.jdbc.Driver</value></property>
        <property name="url"><value>jdbc:mysql://localhost:3306/emp_mvc2</value></property>
        <property name="user" value="root"/>  
        <property name="password" value="123456"/> 
    </bean>
        
    <bean id="dataSource2" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource" destroy-method="shutdown">
        <property name="dataSource"><ref local="mysqlDataSource2"/></property>
        <property name="maxSize"><value>5</value></property>
        <property name="minSize"><value>2</value></property>
        <property name="user"><value>root</value></property>
        <property name="password"><value>123456</value></property>
    </bean>  
    
    <bean id="sessionFactory1" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
         <property name="dataSource" ref="dataSource1"/>
         <property name="mappingResources">
            <list>
              <value>com/ouku/JOTM/entity/Emp.hbm.xml</value>
            </list>
         </property>
         <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.SybaseDialect</prop>
                <prop key="hibernate.show_sql">