Hi,
I've some serious problems with our application:
The application is a transformation and mapping tool which is deployed on Tomcat 6.0 server.
The app is activated by web service, which the referred class in tomcat initiate using spring 2.0.2 the session factory as singleton. It creates our db repository object which thru it we perform the persist/data retrieval (it is also defined as singleton)
After the bean factory is initiated, a separate thread is created for the transformation tool. The transformation is being processed in parallel (multi threaded).
As for now, I'm not able to manage the transaction, and at the end of the transformation process there are hundreds of open connections, waiting for their timeout.
As I read in the docs, session per operation is an anti-pattern. However, I don't know how to handle/try to manage the transactions my own, so I will be able to use the getSessionFactory().getCurrentSession() instead of openSession() foreach db access.
Is there a way to configure transaction manager for that matter? Is it a spring issue? tomcat? hibernate? all together?
Is there a possibility to add hibernate.transaction.factory_class and hibernate.transaction.manager_lookup_class properties for the session factory creation in order to associate it with other the the JDBC transaction manager (default)?
Thanks a lot,
Moti
Hibernate version:
3.0.5
Name and version of the database you are using:
Informix 10
|