Hibernate version: 3.0.5
Background:
Running Hibernate within WebSphere with container (WebSphere) managed transaction and everything works greatly -- stateless session bean + dao + hibernate -- ...until one day there comes a new requirement which translates to a long standing query (10-20 min). In this case the transaction gets time out after a pre-defined period (e.g. 2 min) and the query locks the tables resulting in other transactions not being able to update them.
Questions:
a) how I can make the query not lock the tables?
b) how can I solve the timeout issue? OR how can I remove the transaction context from the query?
I appreciate any suggestions but please don't tell me 'get rid of WebSphere'.
JB
Code:
<property name="connection.datasource">java:comp/env/jdbc/jndiMyDB</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="hibernate.transaction.auto_close_session">true</property>
<property name="hibernate.transaction.flush_before_completion">true</property>
<property name="hibernate.connection.release_mode">auto</property>