I have a custom java object. Once user logs into application I need to keep it in browser’s HTTP session. That session scoped object should then be shared/accessible between portlets of two different CAF packages.
Can you please advise which API to be used to implement the above use case?
Environment details -
webMethods 9.8, Two MWS servers clustered in active passive mode.
Are both portlet types involved here within the same CAF application?
If both portlet types are within the same webapp (aka servlet context) then the portlet specification supplies a mechanism to access the per-portlet-application (APPLICATION_SCOPE) session-attribute map by casting the ExternalContext’s session property to a PortletSession (see [url]http://portals.apache.org/pluto/portlet-1.0-apidocs/javax/portlet/PortletSession.html[/url]). All objects stored in the session using the APPLICATION_SCOPE must be available to all the portlets, servlets and JSPs that belongs to the same portlet application and that handles a request identified as being a part of the same session. Objects stored in the session using the PORTLET_SCOPE must be available to the portlet during requests for the same portlet window that the objects where stored from.