Global session scope

A global session scope is similar to a session scope. The only difference is that it will be used in a Portlet application. Global sessions can be used when we have an application that is built on the JSR-168, JSR-286, and JSR-362 portal specifications. There will be multiple sites/applications that work under a single portlet container.

Portlet containers have different portlets, and all have their own portlet context, as well as portlet session. Portlet sessions work with the portlet boundary, but when we have to share common information between multiple sites, then we can define beans with a globalSession scope. Spring has separate portlet MVC modules for portal applications:

// 1) XML way to configure define application ...

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.