Skip Headers

# Reloading and Refreshing Session Configuration

Previous

Next

You can tell the session manager to refresh an existing session from the `sessions.xml` file. Typically, this would only ever be used in a J2EE environment at redeployment time, or after a reset of a running server. You should only use this option when you know that the existing session is not being used.

Forcing a Reparse of the sessions.xml File

    //In this example, XMLSessionConfigLoader loads sessions.xml from the classpath
    SessionManager manager = SessionManager.getManager();
    Session session = manager.getSession(
        new XMLSessionConfigLoader(), // XMLSessionConfigLoader (sessions.xml file)
        "mysession", // session name
        YourApplicationClass.getClassLoader(), // class loader
        true, // log in session
        true  // refresh session
    );