Sunday 2 February 2014

How to set or change the session timeout value in Oracle Weblogic Server

1) Login into the Admin console and go to left pane click on 'Lock & Edit'

Navigate to YourDomain--> Deployments

Click on the deployed war file

Go to the 'çonfiguration' tab and change the 'Session Timeout (in seconds):' value

This value will be for the application session interval. Please find the below screenshot. In this example, the deployed .war file is 'benefits'.






Once you change this value the value will be set in the 'weblogic.xml' file. Open the file, you can find the below lines.
<session-descriptor>
    <timeout-secs>180</timeout-secs>
    <invalidation-interval-secs>180</invalidation-interval-secs>
</session-descriptor>
Alternatively you can even change the 'timeout-secs' value in the 'weblogic.xml' and re-start the server. Your changed will be reflected.

2) You can also set the session timeout value in the web.xml file as below.

<session-config>
  <session-timeout>60</session-timeout>
</session-config>
 If you set two different values in web.xml and weblogic.xml, the web.xml file is given more preference and it will be considered by the server.

What is Invalidation Interval ?

The time (in seconds) that WebLogic Server waits between doing house-cleaning checks for timed-out and invalid sessions, and deleting the old sessions and freeing up memory.

No comments:

Post a Comment