Hi Edvins
Thanks for your quick answer and valuable information. Someone suggested me using distributed transaction manager with the XA version of
JDBC driver and I tried to implement it, however I got a error message
�org.hibernate.TransactionException: could not register synchronization�.
Would you correct me what I am wrong from the following?
Thanks again,
Brad
===Oracle(9i) JDBC Driver (XA) on Websphere(v6.1) datasource===
oracle.jdbc.xa.client.OracleXADataSource
===hibernate(v3.2.5.ga) configuration===
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</property>
<property name="hibernate.connection.datasource">jdbc/dsXA1</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.CMTTransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
</property>
<property name="show_sql">true</property>
<property name="current_session_context_class">
thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
</session-factory>
</hibernate-configuration>
[Java(v1.4) dao code]
for (int idx=0; idx<InitSessionFactory.NUMBER_OF_INSTATNCE; idx++)
{
try
{
Session session = InitSessionFactory.getCurrentSession(idx);
session.saveOrUpdate(obj);
}
catch ( Exception e )
{
e.printStackTrace();
log.error(": Exception on <updateTestOR>: " + e.getMessage());
}
}