[ 
https://jira.jboss.org/browse/JBSEAM-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Brewer updated JBSEAM-4375:
---------------------------------

    Attachment: nested_MEI_problems.patch
                TEST_CASE.zip


I have created a patch to temporarily promote a nested conversation while 
flushing the conversation context in the ManagedEntityInterceptor to workaround 
the this issue.

I have also included a sean-gen based test case (for the sake of size, I have 
removed the lib directory from the project). You will need to create a mysql 
instance with an meitest schema.

Steps to reproduce the problem:
1. Goto http://localhost:8080/meitest/meiTest.seam 
2. Once the page has loaded click the "edit" link
3. One the modal panel has opened, click the "stop editing" link.
4. An exception occurs because the parentAction component gets created again 
(because the MEI caused it to be removed) and its create method is annotated 
with @Begin. It only needs to be re-created if the MEI flushes and removes it 
from the conversation.

After applying the patch step 4 does not occur and the parent conversation is 
restored correctly.

Hope that helps!


> ManagedEntityInterceptor destroys components in parent nested conversation, 
> when ending a nested conversation
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-4375
>                 URL: https://jira.jboss.org/browse/JBSEAM-4375
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0.GA
>            Reporter: Darryl Smith
>         Attachments: nested_MEI_problems.patch, TEST_CASE.zip
>
>
> setup: 
> Parent (cid1)
>  -> First Nested (cid2) 
>  ----> Second Nested (cid3)
> cid3: conversation.endAndRedirect(true); which calls 
> setLongRunningConversation(false); 
> FacesManager's redirect method tries to encode the page parameters of the 
> parent view, which accesses a component
> created in cid2 the conversation we are returning to.
> This triggers ManagedEntityWrapper's switchToConversationContextOfComponent 
> which switches the current conversation to cid2
> after ManagedEntityWrapper wraps the component ManagedEntityWrapper's 
> restorePreviousConversationContextIfNecessary method is called with oldCid = 
> cid3
> which triggers Contexts.getConversationContext().flush(); 
> When flush is invoke the conversation (cid2) isn't long running, so flush 
> removes all components created in cid2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to