Perhaps I'm being stupid here, but I've read the docs and I can't see a way to achieve what I need. I have a hibernate application (not web app), which has been written using "traditional" hibernate - ie concrete classes, rather than interfaces. As an example, say we have a Customer who has a number of Order objects. I want to be able to intercept Customer.getOrders() to open/close a session/transaction. Having to write a load of *Manager or *DAO classes seems a little bit clumbsy, when I already have perfectly clean, simple concrete classes. The whole point of hibernate is to be (relatively) transparent.
IIUC, the Customer and Order object will NOT be beans, and I can't see a way to proxy these objects. How to I intercept the call to Customer.getOrders() and of course get*** methods on the returned Order objects too?
The documentation only refers to proxying manager objects, not the entities themselves.
Am I missing something?