[jboss-user] [JBoss Seam] - Re: two basic questions for EntityHome

wschwendt do-not-reply at jboss.com
Fri Jul 13 16:28:48 EDT 2007

"matt.drees" wrote : You don't have to make your entityHome @Stateful.  It can be a java bean.  

I know, just for testing purposes the stateful component was a SFSB,  but as you pointed out, stateful components can be an ordinary Java Bean as well. 

anonymous wrote : However, If you're using @stateful, I think that means you need a @Local interface.  Does your interface have all of those properties? 

you're right, Session Beans (both Stateful and Stateless session beans) need a declared business interface.   And in fact, in my case the business interface did NOT contain the accessor methods for the "instance" property and the other missing properties!  Shame on me, just some days ago I wrote in another thread here that a business interface is necessary because Session bean instances are not accessed directly by a caller but rather only indirectly via container-generated stub/proxy objects that implement the business interface as well. 

So mystery solved why my test app didn't work and I got the javax.el.PropertyNotFoundException (at least this is one reason why it didn't work, have not tested my test app yet since I just came home).  Makes me wonder however why it worked (or appeared to work) previously, although with the unfixed Seam version and the "caching behavior".  Perhaps the @Stateful annotation was added at a later point of time...

Anyway,  thanks for your helpful comment, Matt.   I should have checked it more thoroughly before posting, but I was hurrying and wanted to give feedback on the fix.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064143#4064143

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064143

More information about the jboss-user mailing list