rzo1 opened a new pull request, #3012: URL: https://github.com/apache/tomee/pull/3012
`EjbServer` creates its `KeepAliveServer` with `this`. The `ServicePool` wraps `EjbServer` from the outside, and `EjbServer` is not `Unwrappable`, so `KeepAliveServer.getQueue()` always returned `null`. As a result, the keep-alive timer never closed inactive sessions to drain a backed-up pool queue, as reported again in [TOMEE-2044](https://issues.apache.org/jira/browse/TOMEE-2044). The fix keeps the existing `unwrap` path. When that path finds nothing, it looks up the pool in `ServicePool.Registry`, where every pool registers itself on `start()`, and picks the one that wraps this exact service instance. Comparing by identity gives ejbd, ejbds and httpejbd each their own queue. That per-service queue is what the original singleton lookup got wrong. `KeepAliveServerPoolTest` covers two `EjbServer`s, one wrapped directly and one through a filter, each resolving to its own pool. It also covers the not-yet-started case and the `Unwrappable` path. The test fails without the fix (`findPool` returns `null`). `KeepAilveTest` still passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
