|
From: <Jon...@o2...> - 2004-09-21 11:47:38
|
All, I'm thinking about not making lowlevel spring beans like "dataSource", "hibernateSessionFactory" etc. visible to /any/ application code. Of course, they should be accessible by my DAOs via <ref bean..> but right now, one can always access every single bean using MyAppContext.getBean(..) This is also an issue for my DAOs, which in turn should not just be usable by "anybody" but rather only by my BusinessLogicBeans etc. The goal is to ensure some kind of proper design and layers just by keeping an eye on my (ideally visualized) application context descriptors and how <ref bean..> constructs are used. This topic is somehow related also it goes one step further: http://forum.springframework.org/viewtopic.php?t=891 Any thoughts? Jonas |