ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> clazz = cl.loadClass(staleConnectionCheckerClassName);
staleConnectionChecker = (StaleConnectionChecker) clazz.newInstance();
Injection injection = new Injection();
for (Entry<Object, Object> prop : staleConnectionCheckerProps.entrySet()) {
injection.inject(staleConnectionChecker, (String) prop.getKey(), (String) prop.getValue());
}
return staleConnectionChecker.isStaleConnection(e);
} catch (Exception ex2) {
log.warn("exception trying to create stale connection checker (disabling) " +
staleConnectionCheckerClassName, ex2);