Using the session for inter-model communication

Related Topics ...

Overview: Communicating Between Models

Using Linked Java Objects for Inter-Model Communication

Using Events for Inter-Model Communication

Using Linked Models for Inter-Model Communication

Models can store data in the session by using the getWebAppData method on the WebAppAccess object. The data is stored in a simple map, so two different Models can share the same object just by using the same key.

Note that the default behavior of the WebSphere Portlet Factory is to store this data directly in the J2EE session object, and most J2EE platforms recommend keeping this to a minimum. However, the actual storage for this data is through a pluggable interface, so you could, for example, actually store the data in a persistent Java Bean. Applications that work using one technique will automatically work with the other.