Re: Injecting Session into DAO

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 12:47:43 -0300, Lance Java wrote: This conversation sounds like the "Anemic Domain Model vs. Rich Domain Model" argument where an ADM only contains data and a RDM contains data and services. Hey, I don't use ADM! I explicitly said it sucks! ;) I have always used an

Re: Injecting Session into DAO

2012-06-08 Thread Lance Java
in-model-illustrated/ -- View this message in context: http://tapestry.1045711.n5.nabble.com/Injecting-Session-into-DAO-tp5713703p5713725.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-

Re: Injecting Session into DAO

2012-06-07 Thread Thiago H de Paula Figueiredo
On Thu, 07 Jun 2012 16:06:31 -0300, skow wrote: I got the notion that there was a 'Session' service from the code below. Ah, I've just figured out you were talking about Hibernate's session, not the Tapestry Session. :P I think that obtaining the DAO from Tapestry-IoC is where I'm gettin

Re: Injecting Session into DAO

2012-06-07 Thread skow
o off topic, but I am interested in your preferred architecture. Do you use a separate 'business object' and treat the Entity as only a ValueObject with getters/setters? Thanks again! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Injecting-Session-into-DAO-tp571

Re: Injecting Session into DAO

2012-06-07 Thread Thiago H de Paula Figueiredo
On Thu, 07 Jun 2012 13:58:26 -0300, skow 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 Tapestr

Injecting Session into DAO

2012-06-07 Thread skow
es 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? Hopefully I'm just missing something simple and the example above can work. Thanks for any insights you may have! -- View this mess