Hi all,
I had the following configuration:
Code:
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.DB2400Dialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://xxx:xx/xxx:retrieveMessagesFromServerOnGetMessage=true;</property>
<property name="hibernate.connection.username">xxx</property>
<property name="hibernate.connection.password">xxx</property>
<property name="hibernate.default_schema">xxx</property>
<property name="hibernate.current_session_context_class">managed</property>
</session-factory>
and everything was working fine.
When I tried to use a datasource [was 6.1]
Code:
<property name="hibernate.connection.datasource">jdbc/xxx</property>
then when I had a simple insertion [via hibernate] everything was working but the second time of the same object class insertion I get the following error:
Code:
Caused by:
com.ibm.websphere.ce.cm.StaleConnectionException: THE CURSOR xxx IS NOT IN A PREPARED STATE. SQLCODE=-514, SQLSTATE=26501, DRIVER=3.53.70
at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.handleStaleStatement(WSJdbcUtil.java:730)
... 65 more
The transactions are managed manually.
Any hint?