N
NathanIEI
It seems that I have quite the reverse situation from almost every one
else on the subject of session sharing. Unlike most post I've seen, I
DO NOT want to share the session.
I've setup 3 instances of JBoss servers on one machine (localhost:
8080, localhost:8180, localhost:8280) to which I am deploying the same
ear file, for concurrent Q/A testing by different teams. The setup is
good, and works fine, but a problem is introduced when I switch from
one server to the next within the same browser.
I think the problem is that the path variable of the JSESSIONID cookie
holds the same context in all three servers. (ex. path =/mywebapp)
This causes the context to be localhost/mywebapp for all three servers
since the port number isn't taken into consideration. The session is
then considered invalid when the server is switched, and a new session
issued every time you cross a server. I need to be able to have each
session run concurrently with the other, relative to it's own server
instance.
I can explicitly change the <context-root> and repackage for each
server, forcing the path to be different in each cookie, but that can
be a bit cumbersome with the companie's deployment practices. I've
devised a solution that will allow me to change the context depending
on the server:
<context-root>${jboss.server.name}/mywebapp</context-root>
This is fine for testing, but has a negative impact on production.
When the app is deployed to the 'default' (single instance)
configuration in production, you have an unnecessary and ugly addition
to the path like http://myserver/default/mywebapp instead of the //
myserver/mywebapp as preferred.
Anyone have any ideas how to prevent/solve this?
Thanks in advance for *any* help!
else on the subject of session sharing. Unlike most post I've seen, I
DO NOT want to share the session.
I've setup 3 instances of JBoss servers on one machine (localhost:
8080, localhost:8180, localhost:8280) to which I am deploying the same
ear file, for concurrent Q/A testing by different teams. The setup is
good, and works fine, but a problem is introduced when I switch from
one server to the next within the same browser.
I think the problem is that the path variable of the JSESSIONID cookie
holds the same context in all three servers. (ex. path =/mywebapp)
This causes the context to be localhost/mywebapp for all three servers
since the port number isn't taken into consideration. The session is
then considered invalid when the server is switched, and a new session
issued every time you cross a server. I need to be able to have each
session run concurrently with the other, relative to it's own server
instance.
I can explicitly change the <context-root> and repackage for each
server, forcing the path to be different in each cookie, but that can
be a bit cumbersome with the companie's deployment practices. I've
devised a solution that will allow me to change the context depending
on the server:
<context-root>${jboss.server.name}/mywebapp</context-root>
This is fine for testing, but has a negative impact on production.
When the app is deployed to the 'default' (single instance)
configuration in production, you have an unnecessary and ugly addition
to the path like http://myserver/default/mywebapp instead of the //
myserver/mywebapp as preferred.
Anyone have any ideas how to prevent/solve this?
Thanks in advance for *any* help!