IBM Support

The MAXSESSION Table Unmasked

Technical Blog Post


The MAXSESSION Table Unmasked


Note: Barb Ballard recently posted the following blog entry in the Process Automation Group. Since it equally applies to Asset Management, I thought I would post it here too.
When debugging a problem or when looking to recycle a JVM, it is useful to know which users are logged onto the system and what JVM they are working on. If a JVM needs to be recycled, you could then notify the users on that JVM that they will get an interruption in service. Or when debugging a problem it is useful to know what a user was doing on a particular JVM that was experiencing difficulties. If you know when a problem occurred and what users were logged into the JVM at that time, it helps narrow the potential pool of users considerably. So how can you figure this out? Enter the MAXSESSION table.

The MAXSESSION table is used to track connected servers and users. Every active or inactive user and server on the system has an entry in the MAXSESSION table.

When a user logs in or an application server starts, an entry is made in the MAXSESSION table. The column ISSYSTEM  column has a 1 if it is an instance of a server (JVM) that is connected and  a 0 if it is a user that is connected.

When a user logs out, their entry is cleared from the MAXSESSION table.

Every 60 seconds the applications servers update the servertimestamp to the current timestamp to indicate they are still active. A server crash or failure can be detected by checking that the servertimestamp is more than 60 seconds old.

For a user the lastactivity field is updated whenever they do any activity in the system. Inactive users can be detected when the last activity timestamp is not current.

If a user runs 2 or more browsers there will be multiple entries for that user in the MAXSESSION table.

When a user is closes a  session abnormally (for example not using the normal Sign Out button but by clicking the X button of an IE window ), that user's session is not deleted from MAXSESSION until the specified session timeout is reached.

The same is true if some type of error occurs that causes the session to end abnormally.

You can set the system property mxe.enableConcurrentCheck  to 0 to prevent users from logging in more than once. If this property is set and the user closes the browser without  logging out, they will not be able to log back in until the session timeout occurs or the system administrator logs them out.

When you understand  the function of the MAXSESSION table,  it is easy to create queries to pull out the data that you need to diagnose problems or understand who is working on the system.

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]