[JBoss Seam] data modeling
by José Moreira
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
18Â years, 7Â months