• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

HTTP Session Object

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 40552
825
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Malli,
No. The spec prevents session object sharing.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic