-->
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: Transactions and NoRouteToHostConnection exception
PostPosted: Wed Oct 27, 2004 1:48 pm 
Newbie

Joined: Tue Dec 23, 2003 9:05 am
Posts: 2
Hi all,

I am implementing an application using a linux machine, Tomcat4, mysql 3.23.58, and hibernate 2.1.6.

I have a problem when my database machine is turn off. I mean, my application works fine when Tomcat has connection with database machine (this is my log4j logs):

Code:
[Thread-17] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - processing result set
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - result row: 2
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - Initializing object from ResultSet: 2
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - Hydrating entity: com.optivamedia.lysis.PPVEvent#2
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - done processing result set (1 rows)
[Thread-17] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets

[Thread-17] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
[Thread-17] DEBUG net.sf.hibernate.loader.Loader - total objects hydrated: 1
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - resolving associations for [com.optivamedia.lysis.PPVEvent#2]
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - adding entity to second-level cache [com.optivamedia.lysis.PPVEvent#2]
[Thread-17] DEBUG net.sf.hibernate.cache.ReadWriteCache - Caching: 2
[Thread-17] DEBUG net.sf.hibernate.cache.EhCache - key: 2
[Thread-17] DEBUG net.sf.hibernate.cache.ReadWriteCache - Item was already cached: 2
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - done materializing entity [com.optivamedia.lysis.PPVEvent#2]
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - initializing non-lazy collections
[Thread-17] DEBUG net.sf.hibernate.transaction.JDBCTransaction - commit
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - flushing session
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - Flushing entities and processing referenced collections
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - Processing unreferenced collections
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - Scheduling collection removes/(re)creates/updates
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
[Thread-17] DEBUG net.sf.hibernate.impl.Printer - listing entities:

[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - executing flush
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - post flush
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion
[Thread-17] DEBUG net.sf.hibernate.transaction.JDBCTransaction - re-enabling autocommit
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - closing session
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - disconnecting session
[Thread-17] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion


But if I turn off my database machine, it appears that the transaction hangs:

Code:
[Thread-5] DEBUG net.sf.hibernate.impl.SessionImpl - opened session
[Thread-5] DEBUG net.sf.hibernate.transaction.JDBCTransaction - begin


and no more until a lot of minutes. Then I get a java.net.NoRouteToHostConnection exception. So, my question is how can I decrease the time the transaction knows that there is no route to the database machine?

It is extrange, because if I stop my database (software stop), the transaction returns me a NoRouteToHostConnection exception in very few time.

So, what can be the problem? Do you need more information?

Thanks in advance.
Mariano.


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.