@Override
void run(Session session) {
- clear();
+ // clear();
getSshTarget().setSession(session);
if (log.isDebugEnabled())
log.debug("Cached SSH context session to " + getSshTarget());
}
public void afterPropertiesSet() throws Exception {
+ // if (log.isDebugEnabled())
+ // log.debug(getClass() + ".afterPropertiesSet(), " + beanName + ", "
+ // + this);
if (autoconnect)
- run();
+ try {
+ run();
+ } catch (Exception e) {
+ log.error("Could not automatically open session", e);
+ }
}
public void destroy() throws Exception {