Closed GoogleCodeExporter closed 9 years ago
Hello,
your problem is that setIt() is never getting run (try debugging this). This is
because Guice does not scan up the
class hierarchy for @Inject methods. Instead, use the "eager-singleton"
initializer pattern shown in the
documentation in http://www.wideplay.com
Dhanji.
Original comment by dha...@gmail.com
on 31 Mar 2008 at 8:07
Original comment by dha...@gmail.com
on 31 Mar 2008 at 8:08
setIt() actually is getting called when I instantiate the DAO implementations
via my
Guice Injector. I happen to only have 2 DAO classes that extend
GenericHibernateDAO.
When the first is instantiated, it runs fine. I can see setIt being called.
After the
2nd is instantiated, setIt() is called again but as per the logic above, I do
not
start the persistence service again. However, at this point, all of the 2nd DAO
methods fail with the NPE mentioned above
Original comment by forum.na...@gmail.com
on 1 Apr 2008 at 12:56
Original issue reported on code.google.com by
forum.na...@gmail.com
on 30 Mar 2008 at 8:58Attachments: