It sounds like the problem you are trying to solve is:
"how can I have my DAOs use the Seam-managed persistence context when running inside
the context of Seam, but use some other method of persistence context management outside
of Seam"
And I guess you also want to be able to inject your DAOs into Seam components.
Probably the easiest way is to declare them in components.xml, and let Seam inject the
Session that way:
<component name="customerDao"
class="com.mydomain.myapp.CustomerDao">
| <property name="session">#{mySession}</property>
| </component>
Then your DAO's getSession() method can check if the session has been injected, and
return that one if it has been, otherwise use your current mechanism to look up a session
from Hibernate.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993584#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...