I have a webserver load balancing requests to two app servers running a karaf instance on them. To be able to have sticky sessions I need to set the worker name on the karaf inbuilt jetty (JSESSIONID.$WORKER_NAME).
On my old Karaf (Version 4.0.3) I was able to do that using the following property in the 'org.ops4j.pax.web.cfg':
org.ops4j.pax.web.worker.name = 123
I upgraded to Karaf version 4.2.2 now and this does not work anymore. The worker name always is 'node0'.
How can I set this in the newer Karaf version?
I found the solution which is setting the environment variable 'JETTY_WORKER_INSTANCE'. This is used together with the prefix 'node' as worker name.