You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Doychin (JIRA)" <ji...@apache.org> on 2019/01/11 19:38:00 UTC

[jira] [Updated] (TOMEE-2454) During server stop not all Thread context listeners are properly removed

     [ https://issues.apache.org/jira/browse/TOMEE-2454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doychin updated TOMEE-2454:
---------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Minor
>              Labels: pull-request-available
>
> 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
(v7.6.3#76005)