-->
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: Check if the database is up using Hibernate
PostPosted: Wed Nov 29, 2017 11:05 am 
Newbie

Joined: Wed Nov 29, 2017 11:02 am
Posts: 1
Can anybody help for checking if database is up using hibernate 4.x version?


Top
 Profile  
 
 Post subject: Re: Checking database is up using hibernate 4
PostPosted: Wed Nov 29, 2017 4:06 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
You don't need Hibernate for that, you can use the JDBC DataSource connection pool for that.

Since JDBC 4, a connection pool like HikariCP will use Connection.isValid() to check if the DB is available. Check out HikariCP documentation for more details.


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.