In our tomcat application, we catch a CommunicationsException. There are various config parameters which can lead to this, including the database config being set wrong, but also the tomcat config have TOMCAT5_SECURITY=yes
When we catch the exception we want to give a helpful error message to the user. So we want to ask tomcat whether TOMCAT5_SECURITY is set, but we can't work out where in the API this is available.
So what tomcat API call will tell us whether TOMCAT5_SECURITY is enabled?
(The full exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure).