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:
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). |