Java Code Examples for org.apache.catalina.Realm#setContainer()

The following examples show how to use org.apache.catalina.Realm#setContainer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CombinedRealm.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * Set the Container with which this Realm has been associated.
 *
 * @param container The associated Container
 */
@Override
public void setContainer(Container container) {
    for(Realm realm : realms) {
        // Set the realmPath for JMX naming
        if (realm instanceof RealmBase) {
            ((RealmBase) realm).setRealmPath(
                    getRealmPath() + "/realm" + realms.indexOf(realm));
        }

        // Set the container for sub-realms. Mainly so logging works.
        realm.setContainer(container);
    }
    super.setContainer(container);
}
 
Example 2
Source File: CombinedRealm.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Set the Container with which this Realm has been associated.
 *
 * @param container The associated Container
 */
@Override
public void setContainer(Container container) {
    for(Realm realm : realms) {
        // Set the realmPath for JMX naming
        if (realm instanceof RealmBase) {
            ((RealmBase) realm).setRealmPath(
                    getRealmPath() + "/realm" + realms.indexOf(realm));
        }
        
        // Set the container for sub-realms. Mainly so logging works.
        realm.setContainer(container);
    }
    super.setContainer(container);
}
 
Example 3
Source File: CombinedRealm.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Set the Container with which this Realm has been associated.
 *
 * @param container The associated Container
 */
@Override
public void setContainer(Container container) {
    for(Realm realm : realms) {
        // Set the realmPath for JMX naming
        if (realm instanceof RealmBase) {
            ((RealmBase) realm).setRealmPath(
                    getRealmPath() + "/realm" + realms.indexOf(realm));
        }
        
        // Set the container for sub-realms. Mainly so logging works.
        realm.setContainer(container);
    }
    super.setContainer(container);
}