• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Sharing of session objects across two web applications running on same server instance

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

I have a requirement as below:

There are two web applications running on the same server instance. If there is a requirement as I have to use data in session object of webApp1 in webApp2.

Can you please suggest me the best way to implement it?

Thanks in Advance.

Cheers,
Sandeep.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using a database?
 
sandeep Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul Sturrock,

First of all thanks for your reply.

Due to some client specific constraints, I cannot use the Database. Keeping apart form Database and RMI, Can you please suggest me the other way.

What if I serialize the object into a flat file and then FTP that file? I think this would again be some performance hit.
Is there any way we can send the data in request to another application?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you abandon the use of the session (no bad thing, by the way) and redesign your applicaitons to send state with the request that would work. Otherwise you will need some common persistence mechanism to share the data in. FTP doesn't sound the like the right mechanism, things will always be out of date. If you can't use RMI either this is harder to do - I was going to suggest a distributed cache, but distributed caches are RMI based.
 
Ranch Hand
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
persist the session object ?
 
sandeep Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep. I think sending through request would be right choice for my requirement.

Paul, Thanks for your reply.
Aniruddh: I dont want to persist the session object. Thank you for your suggestion.

Cheers,
Sandeep.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic