if (log.isTraceEnabled()) { log.trace("Creating SecurityManager"); }
if (log.isTraceEnabled()) { log.trace("initializing SecurityManager"); }
   public void init() throws NamingException   {      if (log.isTraceEnabled()) { log.trace("Creating SecurityManager"); }      // Get the JBoss security manager from JNDI      InitialContext ic = new InitialContext();      try      {         Object mgr = ic.lookup(securityDomain);         if (log.isTraceEnabled()) { log.trace("JaasSecurityManager is: " + mgr); }         authMgr = (AuthenticationManager)mgr;         realmMapping = (RealmMapping)mgr;         log.trace("JMS SecurityManager initialized");      }      catch (NamingException e)      {         // Apparently there is no security context, try adding java:/jaas         log.warn("Failed to lookup securityDomain=" + securityDomain, e);         if (securityDomain.startsWith("java:/jaas/") == false)         {            authMgr = (SubjectSecurityManager)ic.lookup("java:/jaas/" + securityDomain);         }         else         {            throw e;         }      }      finally      {         ic.close();      }   }