NIH | National Cancer Institute | NCI Wiki  

Problem: My caArray inactivity timeout delay stays stuck at 30 minutes no matter what I set the delay setting to in JBoss.

Topic: caArray Usage

Release: caArray 2.0 and above

Date entered: 10/27/2011

Solution

caArray has its own internal mechanism for setting the timeout delay; this mechanism overrides any timeout setting specified by your JBoss installation. This article explains how to change caArray's timeout delay by editing a setting in the 'web.XML' file found in the 'caarray.EAR' application archive.

Overview

The timeout delay, defined as the duration of inactivity before the session times out and the user is logged out, is specified by the value of the <session-timeout> tag in the 'web.XML' file. The default value, in minutes, is '30', as shown below:


<session-timeout>30</session-timeout>

This value can be changed to any positive integer.

The 'web.XML' file must be extracted from the 'caarray.EAR' archive before it can be edited. Once it has been edited, the file must be re-packaged into 'caarray.EAR', and the original 'caarray.EAR' in your caArray installation folder must be overwritten with the modified version.

Prerequisites

In order to manage EAR and WAR archives, you will need an archive utility with support for the ZIP format. The utility used in this article is WinZip (www.winzip.com), which is freely available.

Caveats and Warnings


JBoss provides its own mechanism for altering the session timeout delay for applications running within a JBoss instance. However, the caArray-specific timeout setting as specified in 'web.XML' overrides the JBoss-general setting. In other words, the JBoss timeout setting is irrelevant in caArray; in order to change the caArray timeout delay, you must follow the procedure outlined in this article. If you do not follow this procedure, your caArray timeout delay will remain at the application's default of 30 minutes regardless of what your JBoss timeout is set to.

Reference Information

  • The 'caarray.EAR' archive is located at the following path:


[MATKC:caArray installation folder]{}[MATKC:JBoss installation folder]\server\deploy


In our example, the caArray installation folder is named 'caarray' and the JBoss installation folder is named 'jboss-4.0.5.GA', so the fully qualified path of the EAR archive is:


caarray\jboss-4.0.5.GA\server\deploy\caarray.ear

  • The 'caarray.WAR' archive which directly contains the 'web.xml' file is contained within the 'caarray.EAR' archive and is located at the root level of the extracted 'caArray.EAR' folder.


  • The 'web.XML' file is contained within the 'caarray.WAR' archive and is located at the following path within the extracted 'caarray.WAR' folder:


[MATKC:WAR folder path]\WEB-INF

Summary and Review of Procedure

In summary, to change the session timeout delay:

  1. Log out of any existing caArray session and shut down any running JBoss instance
  2. Extract the 'caarray.EAR' archive using WinZip or your archive utility of choice.
  3. Locate the 'caarray.WAR' archive found in the extracted EAR folder, then extract this archive.
  4. Locate the 'web.XML' file found in the 'WEB-INF' folder within the extracted WAR folder and open it in a text editor like Windows Notepad.
  5. Find the <session-timeout> tag in 'web.XML' and change the corresponding value to a positive integer representing the number of minutes before the session will time out due to user inactivity.
  6. Save your changes to 'web.XML'.
  7. Use your archive utility to re-create the 'caarray.WAR' archive, incorporating the modified 'web.XML' file. (You can create the archive as a ZIP file, then rename the ZIP extension to WAR, so long as you do not alter the structure of the WAR folder hierarchy.)
  8. Use your archive utility to re-create the 'caarray.EAR' archive, incorporating the re-created 'caarray.WAR' file from the previous step. (You can create the archive as a ZIP file, then rename the ZIP extension to EAR, so long as you do not alter the structure of the EAR folder hierarchy.)
  9. Copy the re-created 'caarray.EAR' file to the path [MATKC:caArray installation folder]{}[MATKC:JBoss installation folder]\server\deploy, overwriting the existing 'caarray.EAR'.
  10. Re-launch JBoss and log back into caArray.
  11. To test the new timeout delay, perform any function in your caArray session, then refrain from using the program for at least the number of minutes you specified in 'web.XML'. Make sure not to move your mouse arrow or press any keys on the keyboard during this time.
  12. To verify that your session has timed out, try to perform another function in caArray. If the session has indeed timed out, you should be re-directed to the login screen.

Have a comment?

Please leave your comment in the caArray End User Forum.

  • No labels