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.  [ 5 posts ] 
Author Message
 Post subject: Why do hibernate often warm me that database changed to XXX
PostPosted: Fri Mar 04, 2005 6:13 am 
Newbie

Joined: Fri Mar 04, 2005 5:41 am
Posts: 3
Hibernate version:2.0

Name and version of the database you are using:mssql 2000

Sometimes when I execute session.getConnection(),hibernate will connect to db again and
hibernate will warm me that database changed to XXX.
Why?
I use ThreadLocal to manange a same db session.
SessionFactory is singleton.
When I close connection ,I execute connection.close() and remove session from ThreadLocal .
One of my servlets invoke 20 database,if one of databases appears this hibernate's warm,servlet's speed will be much slow.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 6:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
its is the driver that sends that warning, not hibernate.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 8:54 am 
Newbie

Joined: Fri Mar 04, 2005 5:41 am
Posts: 3
session.getConnection() means jdbc.getConnection()?
why often warn?
Another thread closed Connection due to reset to connect to db?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 9:14 am 
Newbie

Joined: Fri Mar 04, 2005 5:41 am
Posts: 3
if one thread get Connection from session ,another get a same Connection, one thread execute con.close(), what happen on another thread's connection? will reconnect?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 05, 2005 1:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
again - its the database that says it.

Im guessing you are using ms jdbc - go on their forums and ask why they report this warning each time you connect.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.