1. Were global-session scoped beans removed from Spring 5?
Official documentation no longer mentions it. SCOPE_GLOBAL_SESSION is no longer part of RequestAttributes:
Spring 4: https://docs.spring.io/autorepo/docs/spring/4.2.4.RELEASE/javadoc-api/org/springframework/web/context/request/RequestAttributes.html#SCOPE_GLOBAL_SESSION
Spring 5: https://docs.spring.io/autorepo/docs/spring/current/javadoc-api/org/springframework/web/context/request/RequestAttributes.html#SCOPE_GLOBAL_SESSION
2. If 1 is true: why were they removed?
Update:
Found a commit that removes the stuff. Seems it is because of dropping of Portlet: See commit : https://github.com/spring-projects/spring-framework/commit/2b3445df8134e2b0c4e4a4c4136cbaf9d58b7fc4#diff-42e7410c98a33ab499e5c27858b1c985
Yes. That SCOPE_GLOBAL_SESSION is for sharing session across Portlets and Servlets. And Portlet supported is removed in Spring 5 in SPR-14129 because of :
Spring's Portlet MVC support turned into a second-class feature in recent years, never having been updated to the modern-day
HandlerMethodinfrastructure that Servlet MVC is based on these days (since 3.1 already, with the old Servlet MVC variant deprecated since 3.2). Furthermore, the Portlet 3.0 specification intends to introduce annotation-driven dispatching itself, so there is no strategic place for Spring Portlet MVC either, even within its present niche. And last but not least, common Portlet environments seem to be stuck on Spring 3.x, not even upgrading to Spring 4.x yet.We will therefore drop Portlet MVC support completely as of Spring 5, while at the same time introducing our Reactive MVC variant. We intend to keep supporting (but not recommending) the use of Spring with JSF in a Portlet environment, in particular through Spring Web Flow. For all other purposes, Spring Framework 4.3.x will remain supported until 2020, including its Portlet MVC support (and underlying Servlet 2.5 support).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With