jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: Shared State between different JSF applications

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Thu, 8 Dec 2016 10:15:53 +0100

Hi,

We usually stick to uhm, sticky sessions for the UI, but most servers have
some proprietary feature to cluster the http session. Mojarra even has a
number of tests for this for the GlassFish specific case.

State improvements in general were put on the agenda for JSF 2.3, but
because of various reasons nothing was actually done for it this cycle.

Kind regards,
Arjan Tijms



On Wed, Dec 7, 2016 at 11:39 PM, Michael Müller <
michael.mueller_at_mueller-bruehl.de> wrote:

> All,
>
> Although JSF 2.3 finally reaches a complete state, I have a problem:
>
> With JSF we can declare the state saving being on server or client site.
> Usually I do not like to transmit the whole state to the client. But
> keeping the state on server side forces sessions to be sticky. I'm going to
> test a cluster in cooperation with hazelcast within the next few weeks. I
> guess (I hope), this will allow to share the server site state between some
> machines.
>
> But what I really like to do, is to retrieve a session state which is
> shared between different applications: I like to split a big JSF
> application into some smaller parts which might be deployed independently.
> Using JSF navigation, the next dialog might be served from the same
> application or from a different one. This shall be completely transparent
> to the user. The user session is identified by a session id (using cookie)
> which is used for all of these applications. The different applications
> might be deployed to the same machine or to different machines. Thus, the
> state needs to be conserved in some common place, for example a database,
> e.g. a key value store like redis. Because the application should be
> splitted by function, it might be ok just to share the credentials.
>
> Maybe something like this is possible right now? Or might this be an
> option for a future version? Let me know your thoughts! Thanks.
>
> Herzliche Grüße - Best Regards,
>
> Michael Müller
> Brühl, Germany
> blog.mueller-bruehl.de
> it-rezension.de
> @muellermi
>
>
> Read my books
> "Web Development with Java and JSF": <https://leanpub.com/jsf>
> https://leanpub.com/jsf
> "Java Lambdas and Parallel Streams":
> <http://www.apress.com/de/book/9781484224861>
> http://www.apress.com/de/book/9781484224861
> "Visitors" a photographic image book: <https://leanpub.com/visitors>
> https://leanpub.com/visitors
>
>