AMQProtocolSession session = stateManager.getProtocolSession();
_logger.info("SASL Mechanism selected: " + body.getMechanism());
_logger.info("Locale selected: " + body.getLocale());
AuthenticationManager authMgr = stateManager.getAuthenticationManager();
SaslServer ss = null;
try
{
ss = authMgr.createSaslServer(String.valueOf(body.getMechanism()), session.getLocalFQDN(), session.getPeerPrincipal());
if (ss == null)
{
throw body.getConnectionException(AMQConstant.RESOURCE_ERROR, "Unable to create SASL Server:" + body.getMechanism());
}
session.setSaslServer(ss);
final AuthenticationResult authResult = authMgr.authenticate(ss, body.getResponse());
//save clientProperties
session.setClientProperties(body.getClientProperties());
MethodRegistry methodRegistry = session.getMethodRegistry();