You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Rafael Benevides (JIRA)" <ji...@apache.org> on 2014/04/24 19:35:16 UTC

[jira] [Comment Edited] (DELTASPIKE-371) Weld ContextController.stopApplicationScope() does not destroy application scoped beans properly

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

Rafael Benevides edited comment on DELTASPIKE-371 at 4/24/14 5:34 PM:
----------------------------------------------------------------------

It seems that after updating Weld to 1.1.19.Final the contexts invalidations are working fine.

I added _Assert.assertTrue(CarRepair.isPreDestroyCalled()); and Assert.assertTrue(Car.isPreDestroyCalled());_ to *testShutdownWithInactiveContexts* after _cdiContainer.getContextControl().stopContexts();_ line and the tests are working fine  which means that the contexts are being destroyed and the beans have their callback methods called.



was (Author: rafabene):
It seems that after updating Weld to 1.1.19.Final the contexts invalidations are working fine.

I added _Assert.assertTrue(CarRepair.isPreDestroyCalled()); and Assert.assertTrue(Car.isPreDestroyCalled());_ to *testShutdownWithInactiveContexts* after _cdiContainer.getContextControl().stopContexts();_ line and the tests are working fine.


> Weld ContextController.stopApplicationScope() does not destroy application scoped beans properly
> ------------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-371
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-371
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: CdiControl
>    Affects Versions: 0.3-incubating
>            Reporter: Martin Kouba
>            Assignee: Mark Struberg
>
> The current impl simply clears the application context's bean store which is not enough, e.g. @PreDestroy callback is not invoked. The impl should call org.jboss.weld.context.ApplicationContext.invalidate() as it originally did. It was probably changed in the context of WELD-1072...



--
This message was sent by Atlassian JIRA
(v6.2#6252)