I have a few questions that i hope you can answer.
I am developing a project with Seam JPA and Tomcat(i dont use ejb3).It is not a simple application that i will only use CRUD operations on database.
And i like to use DAO pattern which makes code more readable,reusable etc.
My first questions are,
is it not good/useless to use service and dao layer with Seam? (Service,ServiceImpl,DAO,HibernateDAO)
if i use DAOs , do i have to use EntityManager inside them?What happens if i use EntityManager what happens if i dont?
how can i inject Services/DAOs into the session? i was using Service,Repository annotations to declare them and Autowired
annotations to get them from the session while using Spring.is there any similar way?
For example i have the following code,
but when i call MenuCategoryDAO from an Action class with @In annotation,it comes null.
Do i have to make any other declarations in the components.xml or somewhere else?
Can someone give me example of implementing DAOs without using EntityManager and using them
into Action classes.
Seam doesn't hold your hands, if you want to create DAOs then do, no harm is done.
I'm not Seam developer but AFAIR, you can inject EntityManager or Hibernate Session.
About injecting objects into scopes, did you tried @Out ?
Bijection is a fundamental corner stone in Seam.