Hi,
Thanks to all for the replies. My problem was within the Oracle XA-datasource configuration.
I was using Stateless SessionBeans and a non-XA oracle datasource before without any problem. Then another EJB module (already built) was added as a service provider. Since Websphere doesn't allow more than one non-XA datasources, I had to replace my data source.
There seemed to be a glitch in the WAS Server configuration that prevented my new XA datasource from working. I ended up with removing the server instance and reappling the configurations.
Everything seems find now. Here are things I found easy to be missed:
1. WASD/WAS 5 doesn't actually support XADataSource for Oracle 8. I had to switch to an Oracle 9 database
2. If switching from Oracle 8 to 9, remember to modify your hibernate dialect to Oracle9Dialect.
3. Make sure use the correct XADataSource class name for connection.driver_class.
4. I found recreating data source references helpful for Session beans.
Here is the hibernate.cfg.xml I used:
Code:
<hibernate-configuration>
<session-factory>
<!-- Data Source -->
<property name="connection.datasource">
jdbc/seadatasource</property>
<!-- Database Settings -->
<property name="default_schema">SEATEST</property>
<property name="dialect">
net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.driver_class">
oracle.jdbc.xa.client.OracleXADataSource</property>
<property name="show_sql">true</property>
<!-- JDBC Settings -->
<property name="jdbc.use_streams_for_binary">true</property>
<property name="max_fetch_depth">2</property>
<property name="cache.provider_class">
net.sf.hibernate.cache.HashtableCacheProvider</property>
<!-- Transaction API -->
<property name="transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">
net.sf.hibernate.transaction.WebSphereTransactionManagerLookup
</property>
<!-- Mapping files -->
<mapping resource="hb_TransLog.hbm.xml" />
<mapping resource="hb_State.hbm.xml" />
<mapping resource="hb_StateProfile.hbm.xml" />
</session-factory>
</hibernate-configuration>
Websphere isn't fun. But seems work well with Hibernate anyway ;-)
Dan