Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Session sharing between two apps on different jvms

807580May 26 2010 — edited May 27 2010
Hello,

This post might be existed some where but cant really find the help on it to extent.
Hope I will get help from the forum folks. Thanks in advance.

Question: I want to communicate between two web-apps which are running on two different applicarion servers and both were on different JVMs.
Application "A" is running on the JVM1 - cookie name is "JSESSIONID" with the domain name ".firstapp.com"
Application "B" is running on the JVM2 - cookie name is "JSESSIONID" with the domaina name ".secondapp.com"
Finally the cookie name is same and the domain names are different.

What ever the changes I make in the second app, I want to have the same changes in the first app session. So, trying to acheive the session sync is by firing a servlet (to do the first app session values sync with the session of second app) using the HttpURLConnection.connect().
But some have I am not getting the session when I do request.getSession(false) in the firstapp when I connected from second app using the above said procedure.
Can any one suggest me on this? that how should I solve this problem?

Its abit needed little soon please... Thanks. Balaji
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2010
Added on May 26 2010
10 comments
310 views