Question

I am using JBOSS 4.2.3.GA, in the JMX console for the server we have maxActiveSessions property(The maximum number of active Sessions allowed, or -1 for no limit), for which -1 is by default, on changing this value the and restarting the value again resets to -1 . How to change this value? If there is another way to set maxActiveSession count, please let me know?

Was it helpful?

Solution

maxActiveSessions is a property of the Manager (Session Manager) component.

For detailed information about it see for example http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

Managers and their options need to be defined inside a specific tomcat <Context>

The default manager options for JBoss 4.2.3.GA are in the default context configuration at jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\context.xml (replace default with whatever configuration you are running. )

You can add the property to existing definition like this:

<Context ....>
    ...
  <Manager pathname="" maxActiveSessions="42"/>
</Context>

If you need application-specific configuration of <Context> options for Manager of others you should create a custom /META-INF/context.xml inside your deployment archive. ( see http://tomcat.apache.org/tomcat-6.0-doc/config/context.html for more details )

Addition:* Regarding JMX Console usage:

Using JMX Console you can only inspect and modify properties of current instances of MBeans. Those values usually only hold while the same instances are in memory.

When restarting the service (JBoss/JVM in this case) new instances are created and the properties receive their values either from default values in the configuration files or from default values in the code.

So always look for the configuration files/options to make persistent changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top