This content has been marked as final.
Show 3 replies
-
1. Re: Injecting hibernate session
thejavafreak Jun 4, 2008 4:15 AM (in response to binnyg)Did you inject your DAO from your Action class?
-
2. Re: Injecting hibernate session
binnyg Jun 4, 2008 6:17 PM (in response to binnyg)No, currently I have a DAOFactory returning the DAO to my action class. But eventually I will inject it.
MyDAOInterface myDAO = DAOFactory.getMyDAO();
You are absolutely right. When I injected my dao into Action class session object is not null.
So seam injections will happen only if seam is creating an object. I thought seam would inject even if I am creating object myself coz I am running in seam context. It makes sense to inject in this case but I am wondering if there is a way to create object myself and have injected objects?
Something like
MyObject myObject = SeamContext.createComponent(MyObject.class);
-
3. Re: Injecting hibernate session
mmichalek.mmichalek.micros-retail.com Jun 4, 2008 8:08 PM (in response to binnyg)Have you tried
org.jboss.seam.Component.getInstance(...)
?