Sticky Sessions in JBoss
In workers.properties update lb worker:
On a UNIX system add to jk.conf:
In each Tomcats' server.xml set: <Engine ... jvmRoute="jboss1"> (or jboss2)
To enrich your career and become a JBoss professional, visit Tekslate, the global online training platform:" JBoss Training". This course will help you achieve excellence in this field.
After restarting, test with two browsers Directive sticky_session is set to 1 (or True) by default, but we turn it on to make it explicit. Enabling the shared memory file (JkShmFile) is not required, but allows the HTTPD processes to better communicate on a prefork-type system. The value of the jvmRoute attribute in server.xml`s `<Engine> must match the name of the worker instance as configured in the workers.properties file.
For an in-depth understanding on JBoss click on: