I have two application that run in two Glassfish Instances, i configure my apache to use sticky session
like so :
ProxyPass / balancer://Appcluster/ stickysession=JSESSIONID
But this not work 100% correct, it change some times the instance when the client goes from App1 to App2.
I check the cookies in my navigator it show me something like this :
I found another configuration in web.xml
, like so :
<session-config>
<session-timeout>
30
</session-timeout>
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
So when i make this path like this every thing work fine, but it create a new context every navigation between this two application.
Now i configure my Glassfish and set the App1 like a Default Web Module, this work fine and the context is the same, and the sever create a new cookie like this :
But when i try to connect with the NO Default Web Module, it use two Instances.
Can you please propose the right configuration of Apache and Glassfish to run multiple application in a cluster environment?
EDIT
I notified some thing, so when client goes from App1 to App2, and the VS, every time it create a new cookie like this:
+-------+----------------------------------------+
| APP | Cookie |
+-------+----------------------------------------+-----+
| app1 | b5a1cd4befdc306f6e569d835b5e.instance2 | New |
+-------+----------------------------------------+-----+
| app2 | b6caf890638a506216d625f7c82b.instance2 | New |
+-------+----------------------------------------+-----+
| app1 | b6d1870ad8f3d044cc768b31e810.instance2 | New |
+-------+----------------------------------------+-----+
| app2 | b6d84bf7b2a6fc37e3c9ffaf701b.instance2 | New |
+-------+----------------------------------------+-----+
| app2 | b6d84bf7b2a6fc37e3c9ffaf701b.instance2 |Same | because i don't change the application
+-------+----------------------------------------+-----+
- Why this create a new cookie every time?
- How can fix and make it unique per application?