[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2218) Re-evaluation of filter parameters for persistence contexts

Christian Bauer (JIRA) jira-events at lists.jboss.org
Wed Nov 7 10:31:44 EST 2007


Re-evaluation of filter parameters for persistence contexts
-----------------------------------------------------------

                 Key: JBSEAM-2218
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2218
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Core
            Reporter: Christian Bauer
            Priority: Minor


I use a filter with a Seam-managed persistence context, the filter parameter is #{currentAccessLevel}. This expression is evaluated when the managed PC is created, in ManagedPersistenceContext.initEntityManager(). There is currently no way to re-evaluate that filter condition after the SMPC has been created. This leads to problems in the following scenario:

- #{currentAccessLevel} = 0 when no user is logged in
- #{currentAccessLevel} = 1000 when a user logs in (which requires database queries, so the SMPC is created)
- certain backing beans observe the postAuthenticate event and refresh their state from the database, supposedly with the new #{currentAccessLevel} permission

The backing beans that are called in postAuthenticate get the SMPC that was instantiated with #{currentAccesslevel} = 0. 

A relatively easy solution would be a new @Observer method on ManagedPersistenceContext and a new "org.jboss.seam.resetPersistenceContextFilterParameter" event I could call manually after authentication.



-- 
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