String providerName = ProcessToolContext.Util.getThreadProcessToolContext().getSetting(PROVIDER_TYPE);
if(providerName == null)
{
logger.warning("Mail session provider type is not set, using default database provider");
mailSessionProvider = new DatabaseMailSessionProvider();
}
else if(providerName.equals("database"))
{
logger.info("Mail session provider set to database");
mailSessionProvider = new DatabaseMailSessionProvider();
}
else if(providerName.equals("jndi"))
{
logger.info("Mail session provider set to jndi resources");
mailSessionProvider = new JndiMailSessionProvider();