2

I have 2 Java EE applications which need to share some common user related data of a logged in user.

Is there anyway by which I can store this data in the session from one application and retrieve that data in a second application? I.e. something similar to sticky sessions in .NET.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Richie
  • 9,006
  • 5
  • 25
  • 38

3 Answers3

4

Take a look at Single Sign On functionality.

http://en.wikipedia.org/wiki/List_of_single_sign-on_implementations

saugata
  • 2,823
  • 1
  • 27
  • 39
  • SSO is th best option i agree.. But then i was actually searching for some work around for the time being. +1 for SSO but.. :) – Richie Mar 10 '10 at 10:06
4

Two separate Java EE applications will be having separate session data. If they are on the same domain and you want to share couple of attributes, then you could use a cookie and set attributes into the cookie and read them in each web app.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
JoseK
  • 31,141
  • 14
  • 104
  • 131
  • Thanks..Even though probably not the best of practices, i guess this is worth a try than the proved SSO style..cheers mate :) – Richie Mar 10 '10 at 10:08
1

Single sign-on is the way to go (as prescribed). OpenId http://en.wikipedia.org/wiki/OpenID (Providers include Google, Yahoo, MSN etc) is worth a look

Kannan Ekanath
  • 16,759
  • 22
  • 75
  • 101