[jboss-user] [JBoss Seam] - Re: two basic questions for EntityHome
wschwendt
do-not-reply at jboss.com
Fri Jul 13 09:47:47 EDT 2007
"gavin.king at jboss.com" wrote : Please test the fix.
Sorry for not replying earlier. The CVS checkout of the entire source tree was very slow yesterday. Atfer it was finally finished, I built a Seam version based on this source tree yesterday evening.
Looking at your modification of ManagedEntityIdentityInterceptor, the added method clearWrapper() looks ok to me. But unfortunately, I cannot really test it, because i ran into other problems with the Seam version built with the CVS source.
In short, when I define an EntityHome component using XML,
a context var. with the name of this component is stored in conversation context and bound to an object of a class like org.jboss.seam.framework.EntityHome_$$_javassist_14
This class has all the expected properties such as
createdMessage Successfully created
deletedMessage Successfully deleted
entityClass class aws.objekte.Customer
entityManager org.jboss.seam.persistence.EntityManagerProxy at 186a830
id
idDefined false
instance Customer custNum: 0 firstName: null lastName: null
managed false
newInstance
In contrast, when I define an EnityHome component by extension and annotate it with @Stateful, the corresponding context var. in conversation context is bound to a class such as
class org.javassist.tmp.java.lang.Object_$$_javassist_15
As this class is defined by extension of EntityHome, it should have the properties shown above such as createdMessage, id, instance etc.
But in my case it surprisingly has only the following 3 properties, with all the other properties missing:
id
managed
toString()
(all other properties such as "createdMessage" or "instance" missing).
Consequently, when an EL expression is evaluated that references the instance property of this EntityHome component, an exception is thrown
javax.el.PropertyNotFoundException, Property 'instance' not found on type
Which is no surprise, given that the generated Java assist class shown above is lacking (not only) the instance property.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063994#4063994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063994
More information about the jboss-user
mailing list