You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2017/04/05 20:32:41 UTC

[jira] [Commented] (TOMEE-2029) OpenEJB #finalize might kill a foreign container

    [ https://issues.apache.org/jira/browse/TOMEE-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957596#comment-15957596 ] 

Mark Struberg commented on TOMEE-2029:
--------------------------------------

To be more precise the following line in the code is the problem why we must not use the finalizer for killing the server:
 
{code}
SystemInstance.get().getComponent(Assembler.class);
{code}

This kills whatever is currently registered, even if the server got restarted 3 times for this very ClassLoader...

> OpenEJB #finalize might kill a foreign container
> ------------------------------------------------
>
>                 Key: TOMEE-2029
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2029
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 1.7.4
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.7.5
>
>
> While tracking down a seemingly random TomEE bug in the DeltaSpike test suite I finally figured what the cause is. In 1.7.3 a 'cleanup logic' got introduced to ContextWrapper#finalize.
> Sadly this often kills the wrong instance!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)