[
https://issues.apache.org/jira/browse/TOMEE-2454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla closed TOMEE-2454.
----------------------------------
Fix Version/s: 8.0.0-M3
Resolution: Fixed
Already fixed by the startup/shutdown work merged in
https://github.com/apache/tomee/commit/c5b27fa14b.
> During server stop not all Thread context listeners are properly removed
> -------------------------------------------------------------------------
>
> Key: TOMEE-2454
> URL: https://issues.apache.org/jira/browse/TOMEE-2454
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Reporter: Doychin Bondzhev
> Priority: Minor
> Labels: pull-request-available
> Fix For: 8.0.0-M3
>
>
> When I tried to run some tests more then once using arquilian on second run
> non CDI tests failed the same way like in TOMEE-2448.
> Further investing the situation I found that because tests are run multiple
> times in the same JVM instance where server is stopped at the end of the
> first run and started again before second run.
> Because ThreadContext keeps listeners in a list on the second start another
> instances of listeners are added where these are not added in static
> initializers.
> So when non CDI app is started JSF (in this case) thinks it runs in CDI
> environment and tries to get instance of a service using BeanManger but the
> bean manager that is visible is from the previous run of the server and does
> not contain any beans.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)