-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alan,
On 1/29/13 11:54 AM, alan.farr...@renfrewshire.gov.uk wrote: > Running Tomcat 7.0.29 on Windows XP Professional Service Pack 3 Ready for a Microsoft upgrade cycle? The clock is ticking... > I have been handed a project developed by a former colleague and I > am still learning Java and Tomcat. Welcome to the community! > The project has 4 JNDI's set up Nomenclature nit: that's "has 4 JNDI /resources/". JNDI itself is just a directory interface where you stash stuff. > 2 Oracle and 2 SQL Server with validation queries set up for the > Oracle databases. I want to set up validation queries on the > JNDI's for SQL server and also have the JNDI provide feedback to > the Java application if the database is down. The only feedback you are going to get is (eventual) SQLExceptions. > Can you advise how to do this please? If not possible, then what > is an alternative? Obviously, you can set up a validationQuery in the 2 MS SQL Server resources by just adding an appropriate query (e.g. "SELECT 1 FROM DUAL" or whatever is appropriate in MS SQL Server) to the <Resource> attributes. Were you hoping to get some other behavior than just what validationQuery already provides? FYI if you are using Tomcat's default connection pool, then you are using Apache commons-dbcp, whose configuration guide can be found here: http://commons.apache.org/dbcp/configuration.html That will explain all the configuration attributes you can use (right in the XML) and what they all do. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEIAq0ACgkQ9CaO5/Lv0PBwvgCfd/QXbOkTEsCA4+dVG3GkhcYu dOQAn0lAOIdxaok55TJCE5pu7jb+aR4t =izRU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org