-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate and Spring in Tomcat
PostPosted: Thu Oct 25, 2007 7:22 pm 
Newbie

Joined: Tue Aug 21, 2007 2:55 am
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.