[ 
https://issues.apache.org/jira/browse/MYFACES-2396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783143#action_12783143
 ] 

Leonardo Uribe commented on MYFACES-2396:
-----------------------------------------

1. Take tomcat 6.0.16 or upper
2. Put myfaces jars and all related dependencies on lib folder
3. Put an example war in webapps directory

> @PreDestroy method of Bean in CustomScope not invoked
> -----------------------------------------------------
>
>                 Key: MYFACES-2396
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2396
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Jakob Korherr
>            Assignee: Leonardo Uribe
>         Attachments: myfaces-2396-final.patch, myfaces_2396_proposal.patch
>
>
> Testing the mojarra 2.0.1 sample "custom-bean-scope", MyFaces does NOT behave 
> like Mojarra.
> The problem is that MyFaces does not propagate a PreDestroyCustomScopeEvent 
> correctly. The following code is from the mojarra sample and shows how the 
> event is published:
> public void notifyDestroy() {
>             // notify interested parties that this scope is being
>             // destroyed
>             ScopeContext scopeContext = new ScopeContext(SCOPE_NAME, this);
>             application.publishEvent(FacesContext.getCurrentInstance(), 
> PreDestroyCustomScopeEvent.class, scopeContext);
> }
> However, the @PreDestroy method of the Bean, which is stored in the scope, is 
> not invoked.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to