* @return The logged-in {@link Subject}
* @throws LoginException If something goes wrong when trying to login.
*/
private Subject tryLogin(String[] userPass) throws LoginException {
try {
CallbackHandler handler = new UserPassCallbackHandler(userPass);
LoginContext lc = new LoginContext("kie-jms-login-context", handler);
lc.login();
return lc.getSubject();
} catch( Exception e ) {
logger.error( "Unable to login via JAAS with message supplied user and password", e);