anthony wrote:
it is better not to mix data access with domain model.
About using the same session.... the best you can do is only using the session stored in threadlocal.
Why aren't you using DAO layer?
The fact is that I identified PostgreSQL as my RDBC, Hibernate as my persistence layer and I would like to get things simple, without splitting my app in a lot of layers which, in my case, I believe are useless: the resulting app would be something embeddable in a well-defined anvironment, so I would like to avoid to implement all the design patterns suggested by the j2ee guys.
I would like to implement the DAO layer in the DTO objects, also because the pure-DAO logic to implement is really minimal.
Do you think I'm completely out?
Thanks,