Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2610

Wars observe other wars' conversation destroyed events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.1.4.Final
    • None
    • None
    • None

    Description

      Have two wars in one ear, each with a bean listening to conversation destroyed events:

      @Inject
      private HttpSession session;
      
      public void conversationDestroyed(@Observes @Destroyed(ConversationScoped.class) String cid) {
      	log.infov("Conversation {0} destruction observed in session {1}", cid, session.getId());
      }
      

      Begin and end a conversation, see how it ends up getting observed in a second war too.
      I'm attaching a simple reproducer. Its output:

      2019-12-30 10:48:52,161 INFO  [DestructionObserverWeb1] (default task-1) Conversation 1 destruction observed in session F77Tlp68DuqwjjlGpTS2L3tN61zDUxjBO9vPLJ2v
      2019-12-30 10:48:52,161 INFO  [DestructionObserverWeb2] (default task-1) Conversation 1 destruction observed in session F77Tlp68DuqwjjlGpTS2L3tN61zDUxjBO9vPLJ2v
      

      Both beans apparently see the same session! This doesn't make sense. If I open both http://localhost:8080/web1/ and http://localhost:8080/web2/ then there'll be two different sessions.

      Reproduced in Wildfly 10.1.0.Final (Weld 2.3.5.Final), Wildfly 18.0.1.Final (Weld 3.1.2.Final).

      Attachments

        Activity

          People

            mkouba@redhat.com Martin Kouba
            vsevolodgol Vsevolod Golovanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: