void putIntoLoadedRealms(String realmName, Realm realm) { putIntoLoadedRealms(config.getName(), realmName, realm); probeProvider.realmAddedEvent(realmName); }
void putIntoLoadedRealms(String realmName, Realm realm) { putIntoLoadedRealms(config.getName(), realmName, realm); probeProvider.realmAddedEvent(realmName); }
mgr.putIntoLoadedRealms(name, realm); _logger.log(Level.INFO, "realm.updated.successfully",new Object[]{realm.getName()});
/** * Replace a Realm instance. Can be used by a Realm subclass to * replace a previously initialized instance of itself. Future * getInstance requests will then obtain the new instance. * * <P>Minimal error checking is done. The realm being replaced must * already exist (instantiate() was previously called), the new * instance must be fully initialized properly and it must of course * be of the same class as the previous instance. * * @param realm The new realm instance. * @param name The (previously instantiated) name for this realm. * */ protected static synchronized void updateInstance(String configName, Realm realm, String name) { RealmsManager mgr = getRealmsManager(); if (mgr == null) { throw new RuntimeException("Unable to locate RealmsManager Service"); } Realm oldRealm = mgr.getFromLoadedRealms(configName, name); if (!oldRealm.getClass().equals(realm.getClass())) { // would never happen unless bug in realm subclass throw new Error("Incompatible class " + realm.getClass() + " in replacement realm " + name); } realm.setName(oldRealm.getName()); mgr.putIntoLoadedRealms(configName, name, realm); _logger.log(Level.INFO, SecurityLoggerInfo.realmUpdated, new Object[]{realm.getName()}); }
/** * Replace a Realm instance. Can be used by a Realm subclass to * replace a previously initialized instance of itself. Future * getInstance requests will then obtain the new instance. * * <P>Minimal error checking is done. The realm being replaced must * already exist (instantiate() was previously called), the new * instance must be fully initialized properly and it must of course * be of the same class as the previous instance. * * @param realm The new realm instance. * @param name The (previously instantiated) name for this realm. * */ protected static synchronized void updateInstance(String configName, Realm realm, String name) { RealmsManager mgr = getRealmsManager(); if (mgr == null) { throw new RuntimeException("Unable to locate RealmsManager Service"); } Realm oldRealm = mgr.getFromLoadedRealms(configName, name); if (!oldRealm.getClass().equals(realm.getClass())) { // would never happen unless bug in realm subclass throw new Error("Incompatible class " + realm.getClass() + " in replacement realm " + name); } realm.setName(oldRealm.getName()); mgr.putIntoLoadedRealms(configName, name, realm); _logger.log(Level.INFO, "realm.updated.successfully", new Object[]{realm.getName()}); }
mgr.putIntoLoadedRealms(name, realm); _logger.log(Level.INFO, SecurityLoggerInfo.realmUpdated, new Object[]{realm.getName()});
mgr.putIntoLoadedRealms(name, realm);
/** * Instantiate a Realm with the given name and properties using the * Class name given. This method is used by iAS and not RI. * * @param name Name of the new realm. * @param className Java Class name of the realm to create. * @param props Properties containing values of the Property element * from server.xml * @param configName the config to which this realm belongs * @returns Reference to the new Realm. The Realm class keeps an internal * list of all instantiated realms. * @throws BadRealmException If the requested realm cannot be instantiated. * */ public static synchronized Realm instantiate(String name, String className, Properties props, String configName) throws BadRealmException { //Register the realm provider registerRealmStatsProvier(); Realm realmClass = _getInstance(configName, name); if(realmClass == null) { realmClass = doInstantiate(name, className, props); RealmsManager mgr = getRealmsManager(); mgr.putIntoLoadedRealms(configName, name, realmClass); } return realmClass; }
/** * Instantiate a Realm with the given name and properties using the * Class name given. This method is used by iAS and not RI. * * @param name Name of the new realm. * @param className Java Class name of the realm to create. * @param props Properties containing values of the Property element * from server.xml * @returns Reference to the new Realm. The Realm class keeps an internal * list of all instantiated realms. * @throws BadRealmException If the requested realm cannot be instantiated. * */ public static synchronized Realm instantiate(String name, String className, Properties props) throws BadRealmException { //Register the realm provider registerRealmStatsProvier(); Realm realmClass = _getInstance(name); if(realmClass == null) { realmClass = doInstantiate(name, className, props); RealmsManager mgr = getRealmsManager(); mgr.putIntoLoadedRealms(name, realmClass); } return realmClass; }
/** * Instantiate a Realm with the given name and properties using the * Class name given. This method is used by iAS and not RI. * * @param name Name of the new realm. * @param className Java Class name of the realm to create. * @param props Properties containing values of the Property element * from server.xml * @param configName the config to which this realm belongs * @returns Reference to the new Realm. The Realm class keeps an internal * list of all instantiated realms. * @throws BadRealmException If the requested realm cannot be instantiated. * */ public static synchronized Realm instantiate(String name, String className, Properties props, String configName) throws BadRealmException { //Register the realm provider registerRealmStatsProvier(); Realm realmClass = _getInstance(configName, name); if(realmClass == null) { realmClass = doInstantiate(name, className, props); RealmsManager mgr = getRealmsManager(); mgr.putIntoLoadedRealms(configName, name, realmClass); } return realmClass; }
/** * Instantiate a Realm with the given name and properties using the * Class name given. This method is used by iAS and not RI. * * @param name Name of the new realm. * @param className Java Class name of the realm to create. * @param props Properties containing values of the Property element * from server.xml * @returns Reference to the new Realm. The Realm class keeps an internal * list of all instantiated realms. * @throws BadRealmException If the requested realm cannot be instantiated. * */ public static synchronized Realm instantiate(String name, String className, Properties props) throws BadRealmException { //Register the realm provider registerRealmStatsProvier(); Realm realmClass = _getInstance(name); if(realmClass == null) { realmClass = doInstantiate(name, className, props); RealmsManager mgr = getRealmsManager(); mgr.putIntoLoadedRealms(name, realmClass); } return realmClass; }
throw new BadRealmException("Unable to locate RealmsManager Service"); mgr.putIntoLoadedRealms(name, r); return r; } else {