I have a question regarding the RequestCycle for Databinder and how it will fit a three-tier architecture model.
The main problem that I'm having is when I try to use a DAO. Initially I thought that the class Databinder could provide with the Session object from Hibernate. My understanding is that during each RequestCycle, Databinder controls the openning and closing of sessions. Thus, I thought that if I accessed the hibernate session from the static method of the Databinder class, I was then able to do all the queries and processing inside the request and delegate all the openning and closing to Databinder. Unfortunately, I'm getting null values for the session.
I have configured Hibernate so that will use the ManagedSessionContext class but the problem still persists.
I have the feeling that I have a problem of understanding of how the RequestCycle works. I have read several posting like this
one or my
favorite but some of the APIs have changed. So I am currently lost.
I wanted to build my architecture on top of Databinder Form objects because of its excellent transaction demarcation. Is there a way I can access the session, and do for example a business validation over a user in the data integration layer, and then return the value to the presentation layer (Databinder forms) without using Spring?
Thanks,
Mario