users@glassfish.java.net

Re: GlassFish v3 JSESSIONID Multiple Subdomains and TLDs

From: <glassfish_at_javadesktop.org>
Date: Sun, 11 Jul 2010 22:34:03 PDT

Just to make sure I understand correctly. You have any number of domains pointing to a single web application hosted on a single instance of glassfish:

abc.example.com
def.example.com
gfh.example.com.uk
abc.abc-example.com
etc...

Each client will have a cookie holding the JSESSIONID value which is sent in every request. The JSESSIONID is unique to the client regardless of the domain name. Each cookie "belongs" to the domain sent in the request. If you use the GF server IP address instead of a FQDN everything would still work correctly and the cookie host value would be the IP address.

We have exactly the same situation (admittedly not thousands of domains). What is the actual problem and what are you trying to achieve? Your statement:

"Incoming requests should be able to come through whatever domains are mapped to the server + port and GlassFish listens to... ."

is not clear - this is exactly what does happen (unless you specify a server name in the http listener?). Please let me know if there is something I have missed...
[Message sent by forum member 'ggierer']

http://forums.java.net/jive/thread.jspa?messageID=477309