This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling Session  RSS feed

 
Atul Oberoi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Could you please help me out in migrating session from one jvm to another jvm.This is something like managing session across jvms.I know it can be done by serialzation but iam not finding out the exact way to make it happen.
I have one application which calls another one by window.open.The first one sets cookies and second gets.When i try to get remote user in second and session's attribute, i get some junk and new session.So i think the only way to pass remote user is through session by migrating it.

Thanks in advance !


Regards,

Atul.
[ March 28, 2007: Message edited by: Bear Bibeault ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be trying to serialize a session because sessions are managed by the servlet container.

Instead, create your own custom Serializeable object to contain all the data you want to move around.

Bill
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not an advanced question. Moving...
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are getting the junk value as the session object is not abailable in the other application , so sending the JSESSIONID in the cookie (That I think you are doing now) would not help.JSESSIONID is just like key which the container uses to find the session object.
If the session object is not available then doing so would not be of any use.

You can try the following:

You can pass those information to the page whic would call the window.open script.
You can then send those information using the url to the other application.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!