boolean trace = log.isTraceEnabled();
   public Subject authenticate(String user, String password) throws JMSSecurityException   {      boolean trace = log.isTraceEnabled();      if (trace) { log.trace("authenticating user " + user); }      SimplePrincipal principal = new SimplePrincipal(user);      char[] passwordChars = null;      if (password != null)      {         passwordChars = password.toCharArray();      }      Subject subject = new Subject();      if (authenticationManager.isValid(principal, passwordChars, subject))      {         SecurityActions.pushSubjectContext(principal, passwordChars, subject);         return subject;      }      else      {         throw new JMSSecurityException("User " + user + " is NOT authenticated");      }   }