10 Replies Latest reply on Aug 5, 2014 4:24 AM by Marius Ebel

    WELD injecting SessionScoped beans from another session

    Marius Ebel Newbie

      Hi all,

       

      lately we have been experiencing serious problems with two of our customer systems. Our customers are running two independent instances of the same JSF 2.2 application on two machines having a Glassfish 4.0 Server with WELD 2.0.5. At random requests we get @SessionScoped bean instances injected that have the content of another session. We have been tracking this problem for a while and haven't been able to find a solution yet. A detailed explanation of the problem can be found on stack overflow:

      http://stackoverflow.com/questions/25017334/weld-gf4-sessionscoped-sometimes-wrong-bean

       

      (Un-)luckily there are other people having the same problem, but it still seems to be extremely rare:

      http://stackoverflow.com/questions/23906639/jsf-cdi-session-scoped-bean-corruption/25096573

       

      I haven't been able to find a bug in WELD's issue tracker that indicates that this is a known problem. Is there anyone who can tell if this is actually a WELD problem or some other worst-case combination of different factors coming together? The machine restart thing makes us really wonder that...

       

      Any hint is gladly appreciated!