[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2218) Re-evaluation of filter parameters for persistence contexts
by Christian Bauer (JIRA)
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
17 years, 2 months
[jbossseam-issues] seam-gen generate-entities and mysql
by Morten Matras
I'm trying to reverse engineer an application using seam-gen
generate-entities from a mysql database and get some errors that's related
to the column types.
The database is generated from a Hibernate based webapplication or EJB3
based application. (I'm trying two different applications).
I get errors like:
"Wrong column type: description, expected: varchar(65535)" if the property
is a string with type = "text"
So what is mapped like this in the original hibernate project:
@Type(type="text")
can't be reverse engineered back to the same type.
Any ideas on how to proceed / avoid these column type problems.
--
Morten Matras
Udviklingschef
GAMP media og Blob Communication ApS
Vindegade 99-103
5000 Odense C
Tlf: 61711103
E: morten(a)gampmedia.dk
T: 76 654321
W: www.blobcom.com
E: morten(a)blobcom.com
17 years, 2 months