Share Session between 2 Java EE applications deployed in JBoss AS

末鹿安然 提交于 2019-12-20 02:58:14

问题


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.


回答1:


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.




回答2:


Take a look at Single Sign On functionality.

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




回答3:


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



来源:https://stackoverflow.com/questions/2415032/share-session-between-2-java-ee-applications-deployed-in-jboss-as

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!