If I read this correctly, all code that uses persistence or calls other
code that might use persistence has to explicitly pass around the
session. This leads to tight coupling:
1) moving to another persistence strategy where the dbManager/session is
not passed around won't work with the code
2) everything needs to know if the objects it works with might use
persistence, where that's really not the business of the caller
e.g.
void person.updateCart(cart, Session); // bad coupling
this assumes that the "cart" is persistently tracked, rather than
cached, put into JNDI, updated via a web service, stored in a
HTTPSession, etc. |