日期:2014-05-16 浏览次数:20435 次
<session-factory> <!-- 多数据源使使用,需要在J2EE服务器上配置XA数据源 --> <property name="connection.datasource">XAOracleDS_MAIN</property> <property name="hibernate.session_factory_name">hibernate1</property> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> <property name="jta.UserTransaction">UserTransaction</property> <property name="dialect">org.hibernate.dialect.OracleDialect</property> <property name="jdbc.batch_size">5</property> <property name="jdbc.fetch_size">5</property> <property name="max_fetch_depth">1</property> <mapping resource="org/bamboo/hibernate/demo/User.hbm.xml" /> </session-factory>
<session-factory> <property name="connection.datasource">XAOracleDS_ORDER</property> <property name="hibernate.session_factory_name">hibernate2</property> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> <property name="jta.UserTransaction">UserTransaction</property> <property name="dialect">org.hibernate.dialect.OracleDialect</property> <property name="jdbc.batch_size">5</property