tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <Christoph.Nenn...@lex-com.net>
Subject Re: jdbc check available database
Date Tue, 02 Aug 2016 07:44:19 GMT
> Hello guys,
> 
> I’ve SQL Server database with Tomcat 7 and, when I restart only 
database,
>  webapps on Tomcat didn’t works , it show me error to connect to 
database ..
> 
> In webapp context I use jdbc driver for connect, so there is a kind of
> method for retry to connect to database when it return available?
> 
> 
> 

Hi,

I suggest to use a DataSource instead of dealing with jdbc connections on 
your own.

see:
http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html


Regards,
Christoph


This Email was scanned by Sophos Anti Virus
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message