Sun Java System Application Server Enterprise Edition 8.2 Quick Start Guide

ProcedureTo Verify HTTP Session Failover

  1. To display the first page of the clusterjsp application, type this URL in your browser:

    http://localhost:web-server-port/clusterjsp

    Replace the localhost variable with the name of the system that the Web Server is running on.

    Replace the web-server-port variable with the value of the port attribute of the LS element in web-server-install-dir/https-hostname/config/server.xml. For this example, port 38000 is used.

    A page similar to what you saw in To Verify the Application Deployment appears.

  2. Examine the Session and Host information displayed. For example:

    • Executed From Server: localhost

    • Server Port Number: 38000

    • Executed Server IP Address: 192.18.145.133

    • Session ID: 41880f618e4593e14fb5d0ac434b1

    • Session Created: Wed Feb 23 15:23:18 PST 2005

  3. View the server access log files to determine which application server instance is serving the application. The log files are located here:

    • Solaris Java Enterprise System installation:

      /var/opt/SUNWappserver/nodeagents/nodeagent-name/i1/logs/access/server_access_log

      /var/opt/SUNWappserver/nodeagents/nodeagent-name/i2/logs/access/server_access_log

    • Linux Java Enterprise System installation:

      /var/opt/sun/appserver/nodeagents/nodeagent-name/i1/logs/access/server_access_log

      /var/opt/sun/appserver/nodeagents/nodeagent-name/i2/logs/access/server_access_log

    • Windows Java Enterprise System installation:

      install-dir\nodeagents\nodeagent-name\i1\logs\access\server_access_log

      install-dir\nodeagents\nodeagent-name\i2\logs\access\server_access_log

    • Standalone Application Server installations:

      install-dir/nodeagents/nodeagent-name/i1/logs/access/server_access_log

      install-dir/nodeagents/nodeagent-name/i2/logs/access/server_access_log

  4. Stop the Application Server instance that is serving the page.

    1. In the Admin Console, in the left pane, expand Clusters.

    2. Click FirstCluster.

    3. In the right pane, click the Instances tab.

    4. Select the server instance that served the request and click the Stop button.

  5. Reload the clusterjsp sample application page.

    The session ID and session attribute data are retained.

  6. Check the access log of the other Application Server instance, and notice that it is now servicing the request.

    The state failover features work because the HTTP session is stored persistently in the HADB. In addition to the HTTP session state, the Application Server also can store the state of EJBTM enterprise beans in the HADB. For more information, see Sun Java System Application Server Enterprise Edition 8.2 Developer’s Guide.