This is an abolutely massive project. It's 10 million lines of legacy non-java code that are slowly being rewritten into
java. It spans many different disciplines (financial, inventory, human resources, etc, etc).
Without boring you with a ton of details my core DAO
pattern classes all exist in a "foundation" project. The implementation of the DAO objects themselves all exist in seperate projects (let's take the Invetory project for example). The DAOFactory (actually a concrete implementation for a specific database) in the foundation project is the one that hands the individual inventory DAO objects out. So that's where the circular reference comes from. The foundation project defines an abstract DatabaseDAO class, the inventory package implements DAO objects which extend the DatabaseDAO class in the Foundation project. The DAOFactory implementation in the Foundation project is the one that hands out the inventory DAO objects.
On smaller projects I'd just put the DAO object implementations in the same place as the DAO core code. But in this case it would become massive and 100 developers would all be trying to work on it simultaneously. It makes more sense for the DAO object implemenations to be in their respective specific projects.
I need a whiteboard!
Basically this is a text book Sun DAO pattern implementation where all the boilerplate (DAOFactory abstract class, DAOFactory concrete class, DAO abstract class) all exist in one project and the actual DAO object implementations will be in another project. Actually there be in a lot of other projects, but for this example just limiting it to one other project demonstrates the problem.
[ October 21, 2008: Message edited by: Todd Johnson ]