Hello .
I'm using hibernate in a WebSphere Portal 5.1(based on WebSphere Application Server 5.1.1) DB2 8.2 environment with several applications.
I've two datasources configured to the same database,for some reason i
can work with only one of them using Hibernate.
Hibernate initialization fails when using second datasource.
Both datasources has the same parameters (connection pool ,driver).
Any idea wht's causing that?
Regards,
Guy Shkolnik
Hibernate version:3.0
Mapping documents:
<property name="hibernate.connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property>
<!--property name="hibernate.jndi.url">iiop://localhost:2811/</property>
<property name="hibernate.jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property-->
<property name="hibernate.session_factory_name">ExpensesSessionFactory</property>
<property name="hibernate.connection.datasource">jdbc/expensesDS</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<!--property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="jta.UserTransaction">thisNode/servers/WebSphere_Portal/jta/usertransaction</property>
<property name="org.hibernate.cache">false</property-->
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html