I have 3 EAR packages which combined together makes one huge web java application. Is it possible to configure the beans into the packages to share the session id data between them. My idea is to develop a login form which registers users into database tables using session id. Every time then users browse the application their session id is used to identify the users. The tricky part comes when users switch between different EAR packages and beans. The session id will change and other beans won't know what is the new session id. Is there a way to configure the beans into the EAR packages to share the data which contains the session id.
Kind regards Peter
You can get all three web apps to share the same JSESSIONID by setting the <Manager pathname=""/> setting in WEB-INF/context.xml (this has changed a few times between underlying tomcat versions).
This doesn't solve your problem though, even though all three sessions will share the same JSESSIONID they will still access the session from a different context so their session data will be separate from each other.
Sorry I don't have much more to tell you I just stumbled through this same problem.
My idea is to create a login page which after successfull login takes the cookie session id and the IP address of the users and place them into tables into database. So when user wants to access one of the modules session bean every time takes the cookie and the IP address and compares them with the one from the database. The key point here is the session id. In every module it must be the same. I will make tho identical EAR packages and I will configure JBoss to see is this going to work.