private void stop() {
String jndiName = getJndiName();
if (jndiName != null && jndiName.length() > 0) {
try {
Context context = new InitialContext();
context.unbind(jndiName);
log.info("JavaMail session unbound from " + jndiName);
} catch (NamingException e) {
// we tried... this is a common error which occurs during shutdown due to ordering
}
}