jakarta-eesession-replication

Is session replication a part of Java EE standard


I'm wondering whether session replication between application servers is a part of official EE standard? I can't find anything about it so providing a link to official documentation would be appreciated.


Solution

  • The answer is not exactly. See, in the latest version of the JavaEE specification (under the Servlet 3.1 section), there are several mentions of Distributable Web Applications From the specification:

    The Servlet specification defines distributable web applications. To support Java EE applications that are distributable, this specification adds the following requirements...

    Web containers must support Java EE distributable web applications placing objects of any of the following types (when supported by the Java EE product) into a javax.servlet.http.HttpSession object using the setAttribute or putValue methods:

    • java.io.Serializable
    • javax.ejb.EJBObject
    • javax.ejb.EJBHome
    • javax.ejb.EJBLocalObject ...

    It also goes on to say

    A web container that supports multi-VM operation must ensure that, when a session is moved from one VM to another, all objects of supported types are accurately recreated on the target VM.

    While it may be somewhat ambiguous, I can deduce from all the above that a distributable web applications (read: distributed session objects/session replication) is part of the specification