Typically in java EE app the transaction scoping starts at business layer where the underlying DAO's can be bound in a single transaction.
I have seen the transaction being handled declaratively using Spring or EJB where in the transaction kicks in at the business layer nesting the required DAO's.
Subsequently the DAO's interact with their Hibernate counterparts.
But how can the transaction be injected (declarative or programmatic) fashion when the business layer is java POJO's and not something like EJB or Spring.
Let me know what is the best way to implement here.
I think you've got a good grounding on how to coordinate transactions amongst various J2EE/JEE layers.
Even though you have a number of POJOs representing your data layer, usually there's some type of service layer, or application service that will coordinate and organize how these various POJOs are persisted to the database. It's in this application service class that you can inject your transaction management, be it programmatic, or declarative if you have the declarative capabilities.
A wop bop a lu bop a womp bam boom! Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!