Realm _getInstance(String name) { Realm retval = null; retval = (Realm) loadedRealms.get (name); // Some tools as well as numerous other locations assume that // getInstance("default") always works; keep them from breaking // until code can be properly cleaned up. 4628429 // Also note that for example the appcontainer will actually create // a Subject always containing realm='default' so this notion // needs to be fixed/handled. if ( (retval == null) && (Realm.RI_DEFAULT.equals(name)) ) { retval = (Realm) loadedRealms.get (getDefaultRealmName()); } return retval; }
public String getDefaultRealmName() { return getRealmsManager().getDefaultRealmName(); }
/** * Returns the name of the default realm. * * @return Default realm name. * */ public static synchronized String getDefaultRealm() { RealmsManager mgr = getRealmsManager(); if (mgr != null) { return mgr.getDefaultRealmName(); } else { throw new RuntimeException("Unable to locate RealmsManager Service"); } }
/** * Returns the name of the default realm. * * @return Default realm name. * */ public static synchronized String getDefaultRealm() { RealmsManager mgr = getRealmsManager(); if (mgr != null) { return mgr.getDefaultRealmName(); } else { throw new RuntimeException("Unable to locate RealmsManager Service"); } }
Realm _getInstance(String configName, String name) { Realm retval = null; retval = configGetRealmInstance(configName, name); // Some tools as well as numerous other locations assume that // getInstance("default") always works; keep them from breaking // until code can be properly cleaned up. 4628429 // Also note that for example the appcontainer will actually create // a Subject always containing realm='default' so this notion // needs to be fixed/handled. if ( (retval == null) && (Realm.RI_DEFAULT.equals(name)) ) { retval = configGetRealmInstance(configName,getDefaultRealmName()); } return retval; }
Realm _getInstance(String configName, String name) { Realm retval = null; retval = configGetRealmInstance(configName, name); // Some tools as well as numerous other locations assume that // getInstance("default") always works; keep them from breaking // until code can be properly cleaned up. 4628429 // Also note that for example the appcontainer will actually create // a Subject always containing realm='default' so this notion // needs to be fixed/handled. if ( (retval == null) && (Realm.RI_DEFAULT.equals(name)) ) { retval = configGetRealmInstance(configName,getDefaultRealmName()); } return retval; }
/** * Returns the name of the default realm. * * @return Default realm name. * */ public static String getDefaultRealm() { Habitat habitat = Globals.getDefaultHabitat(); RealmsManager mgr = habitat.getComponent(RealmsManager.class); if (mgr != null) { return mgr.getDefaultRealmName(); } else { throw new RuntimeException("Unable to locate RealmsManager Service"); } }