jakartaee / jakartaee/mail-api

EventQueue should be terminated only by its owner

Open
#735 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
285
Forks
109
Avg merge
15h 19m
Merged PRs (30d)
1

Description

Both `Service.notifyConnectionListeners` and `Folder.notifyConnectionListeners` are calling `EventQueue.terminateQueue()` if `type` is `ConnectionEvent.CLOSED` . However, if `mail.event.scope` is set to 'application' or 'session' this can cause to some later events to be lost without being processed.

This problem should be fixed to allow queue termination only when object that is processing event owns `EventQueue`.

Contributor guide

Open the contributing guide

Research direction

Start with Service.notifyConnectionListeners and Folder.notifyConnectionListeners, then trace how EventQueue.terminateQueue() determines ownership. Reproduce the CLOSED-event behavior with application- or session-scoped mail.event.scope, and verify that only the owning object terminates the queue and later events are still processed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.