[jboss-user] [JBoss Seam] data modeling

José Moreira jose.moreira at josemoreira.net
Tue Oct 2 12:08:40 EDT 2007


Hello again,

yesterday i finally had a little more time to dedicate to jboss seam but
im stuck.

I (think) i want to implement the Seam actions as stateful session beans
and delegate data acess to POJO's for reusability,
but i cant inject the POJO's in the Seam actions (components)

for example (if i remember exactly the code i wrote):

--------------------------
@name("userDao")
class UserDao
{

     @PersistenceContext
     EntityManager em;

     User find(String username, String password)
     {
        ....
     }

}
------------------------------------------------------------------------------
@Stateful
@name("TestAction")
class TestAction {
     @In
     private UserDao userDao;

  .....

}
------------------------------------------------------------------------------

i get NullPointerException using userDao (not injected).

Im close to have vacations and i will devour the Seam documentation and
code ;)


king regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3281 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.jboss.org/pipermail/jboss-user/attachments/20071002/b6eef628/attachment.bin 


More information about the jboss-user mailing list