private SessionValidator initializeSessionValidator(Map channelInfo)
throws MessageException {
// If MPS is communicating with the SMSC asynchronously then we
// can't validate sessions.
SessionValidator sessionValidator = null;
if (!"async".equals(SMSCBindType)) {
// Don't bother running the session validator if each
// session is validated before it is used.
if (!validateBeforeUse) {
int sessionCheckingInterval = getIntValue(channelInfo,
VALIDATION_INTERVAL, false, SessionValidator.WAIT_FOREVER);
LOGGER.info("session-validation-interval",
new Integer(sessionCheckingInterval));
sessionValidator = new SessionValidator(
sessionPool, sessionCheckingInterval);
Thread sessionCheckerThread = new Thread(sessionValidator,
"Thread-SessionValidator");
sessionCheckerThread.start();
}