On Thu, 07 Jun 2012 13:58:26 -0300, skow <r...@skow.org> wrote:

The problem is that @InjectService("Session") in UserDao doesn't seem to do anything.

That's because there's no Session service. Just inject Request and use one of the getSession() methods. And don't forget that UserDao should be a Tapestry-IoC service and instances of it (UserDao) must be obtained from Tapestry-IoC in one way of another (@Inject or some ObjectLocator or Registry method).

I've tried various permutations of @Inject, @InjectService, and messing around in AppModule, but the session is always null when it goes to use it to createQuery.

Is the fundamental design of View->BusinessObject->DAO deprecated and needs to be adjusted for the IoC world of Tapestry?

No. I wouldn't architect my code like yours (I don't like the idea of entity classes using DAOs themselves), but the answer is still no.

--
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to