문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top