-->
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.  [ 2 posts ] 
Author Message
 Post subject: Connection unclosed in Weblogic
PostPosted: Wed Jan 07, 2004 8:22 am 
Newbie

Joined: Wed Jan 07, 2004 8:10 am
Posts: 1
We have used Hibernate 2.0.3 for our work and found
that it's an extremely useful tool. Our clients are
very satisfied with the performance of the
application.

However we are facing one problem, I request for
suggestions. I used Hibernate with Weblogic 7.0. We
have only the following entries in
hibernate.properties file.
====================================
hibernate.connection.datasource datasourcename
hibernate.dialect
net.sf.hibernate.dialect.OracleDialect
hibernate.show_sql false
hibernate.transaction.factory_class
net.sf.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class
net.sf.hibernate.transaction.WeblogicTransactionManagerLookup
===================================
I have set the maximum connections in Weblogic (WL)
connection pool as 2, minimum as 1, increment as 1 and
the shrink period as 1 minute. In the hibernate class,
I have a static SessionFactory. I open a session in
each of the hibernate methods, do some iterate, save,
delete operations and flush and close the session
before returning from the method. These operations are
happening perfectly.
The problem arises when I deploy the application
repeatedly without restarting the server. Since I have
2 connections maximum in the connection pool, in the
3rd deployment, the deployment fails.
Can you help us out ?

_________________
Regards,
Santanu Goswami


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2004 9:34 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Implement context listener to close session factory or pool (all connections ), server will fire context destroy event.
It must be better to store sesion factory as context attribute than static singleton for web application too.
http://java.sun.com/webservices/docs/1. ... lets4.html


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

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.