I know it's a quite big topic, just want to know if there's any best practise I can follow.
Let me introduce the project architecture first.
The web application is clearly divided into three layers: presentation, business, and persistence.
In presentation layer, I use
struts. In struts action classes, I call facades provided by business layer.
In business layer, I have a few facades represent a few modules. Calls between modules must call its facade. Within a module, there maybe a lot of classes implements business logic. All persistence related call would be forward to DAO interface, which is provided by persistence layer.
In persistence layer, there are a few DAO implementations represent their modules. In each DAO implementation, data accesses are encapsulated. No matter what persistence approach will be used, it's just a kind of implementation.
Say, if I use container-managed transaction. I�m not sure where the transaction starts and ends. Does it happen in facades? Or happen in individual classes in business layer? I know it cannot be in struts classes.
If we handle transaction by ourselves, where should we start and commit it? In struts action? Fa�ade? Or where?
I need your help, guys. I need to know what is the best practise and why?
Thanks and waiting for your reply.