[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1857) ManagedEntityIdentityInterceptor nulls fields incorrectly in reentrant calls to conversation scoped components

Kahli Burke (JIRA) jira-events at lists.jboss.org
Mon Sep 17 18:05:10 EDT 2007

    [ http://jira.jboss.com/jira/browse/JBSEAM-1857?page=comments#action_12377245 ] 
Kahli Burke commented on JBSEAM-1857:


If that is the case you may want to look at the action of the interceptor carefully in a debugger and see if you can discover what condition is causing your problem.  That is the way I was able to discover the reentrant issue.  I am using Eclipse, and using the conditional breakpoints to filter out everything but a single component and field and carefully tracking how fields were populated and nulled by reflection (org.jboss.seam.util.Reflections) was what enabled me to do this.

I will also mention another case where this can come up, which is if you are mixing access of an intercepted component through the proxied object, but somewhere else as the raw unproxied object.  This could occur if you passed 'this' along to some other object as a reference.  Make sure you aren't doing this.  This is similar to restrictions on how J2EE Session beans can be passed as references.

Good luck in your investigation, if you discover anything please share your findings with us.

> ManagedEntityIdentityInterceptor nulls fields incorrectly in reentrant calls to conversation scoped components
> --------------------------------------------------------------------------------------------------------------
>                 Key: JBSEAM-1857
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1857
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0.BETA1
>         Environment: Seam 2.0.0.BETA1, also jboss-seam-CVS.2007-08-22_00-49-47 
>            Reporter: Kahli Burke
>         Assigned To: Norman Richards
>            Priority: Blocker
>             Fix For: 2.0.0.CR1
>         Attachments: ManagedEntityIdentityInterceptor.patch.txt
> When a conversation component method is called in a reentrant fashion, entity fields are nulled incorrectly.  
> The scenario is as follows:
> I. Component A method is called
>   A. entityIdsToRefs(). (reinject entity fields) 
>   B. Method invoked
>   C. Component A calls method in object B
>   D. Object B calls method in Component A.
>     i. entityIdsToRefs()
>     ii. Method invoked
>     iii. entityRefsToIds(). (disinject entity fields, set to null, save in conversation)
>   E. entityRefsToIds(). (fields are already null, so clearWrapper is called, and the objects are removed from the conversation)
> II. Component A method is called, values are null, and cannot be retrieved from the conversation context (they are in the removals map)
> The solution seems to be the same as what was done with the BijectionInterceptor in JBSEAM-631.  I wonder if this also might be related to JBSEAM-1840?
> I've attached a patch that fixes the problem for me, please review.
> Thanks!

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


More information about the seam-issues mailing list