Hi,
I have a server running Hibernate, using C3P0 as a connection pool. When I start up my application, if the MySQL server is down when i start the application using
new Configuration().configure().buildSessionFactory();
I get the following error
Caused by: java.net.ConnectException: Connection refused: connect
but this seems to be getting caught and printed by C3P0 or Hibernate itself and not let me catch it. Is there any way, such as a setting in hibernate.cfg.xml to allow me to catchi this myself. I have put a try catch around buildSessionfactory() but nothing ever propogates up to this method call.
Thanks in advance
Ben
I have a server running Hibernate, using C3P0 as a connection pool. When I start up my application, if the MySQL server is down when i start the application using
new Configuration().configure().buildSessionFactory();
I get the following error
Caused by: java.net.ConnectException: Connection refused: connect
but this seems to be getting caught and printed by C3P0 or Hibernate itself and not let me catch it. Is there any way, such as a setting in hibernate.cfg.xml to allow me to catchi this myself. I have put a try catch around buildSessionfactory() but nothing ever propogates up to this method call.
Thanks in advance
Ben