Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Session Object

 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can two applications deployed in the same application server, with different nodes can able to share the session objects?

Regards,
M.S.Raman
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Malli,
No. The spec prevents session object sharing.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question & Question form JGuru.com

What servlet engines support clustering -- that is, sharing of session data across multiple load-balanced web servers?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malli Raman:
Hi,

Can two applications deployed in the same application server, with different nodes can able to share the session objects?

Regards,
M.S.Raman



If you want share why not store in database.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pradeep,

From one application (link is provided) to open another application and both applications are deployed in different nodes of the same app server. First application stores the user information in session object which the second application wants to use. Is it possible?

Regards,
M.S.Raman
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malli Raman:
Hi Pradeep,

From one application (link is provided) to open another application and both applications are deployed in different nodes of the same app server. First application stores the user information in session object which the second application wants to use. Is it possible?

Regards,
M.S.Raman



I think, you can use Single-Sign-On System for solve this problem.

Reference Website
http://www.theserverside.com/news/thread.tss?thread_id=25652
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malli Raman:
Hi Pradeep,

From one application (link is provided) to open another application and both applications are deployed in different nodes of the same app server. First application stores the user information in session object which the second application wants to use. Is it possible?

Regards,
M.S.Raman



Moreover since both application is going to deployed in the same server /jvm i think the session objects will be stored in the same memory. If that's the case I think we can use this option. (I haven't tried this one).

-Raman
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From one application (link is provided) to open another application and both applications are deployed in different nodes of the same app server. First application stores the user information in session object which the second application wants to use. Is it possible?


Well,it is not.
You could persist the user details (present in session of first m/c) in the database. Pass the id of the user as parameter in the URL. The 2nd m/c now receives the id and serches in the database and retrives the user info.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In such case, the application itself must keep trace of access record, otherwise, it may not know there are 2 sessions accessing it, rite?

Nick
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:


Well,it is not.
You could persist the user details (present in session of first m/c) in the database. Pass the id of the user as parameter in the URL. The 2nd m/c now receives the id and serches in the database and retrives the user info.


Thanks Pradeep. I agree with you and I am thinking about other possible solution so that i don't need to touch the first application

Regards,
M.S.Raman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic