Hey Guys
I have been on asking a few questions in the last couple of weeks, and i got a few good answers so i'm gonna try again. I need a suggestion on how to set up a proper DAO for the following situation.
I may have different db connections (MySQL, SQLServer, Oracle) sounds like factory
pattern, but i may also have Web Service, and XML File I/O DAO's as well. Then i have something i called a User Defined DAO where i use
java reflection and an XML file accessed with XML Beans, to pull out connection info and connection logic, and return a HashMap of Info. In this DAO there is only one method and it will execute whatever logic it finds in the XML file through reflection. That is so that users aware of the data they need can create a query and get a resultset back without needing to change compiled code, XML files on the server are refreshed dynamically. The XML would contain things such as expected parameters, and SQL, or Web Service method info and parameters...etc
Obviously Factory Pattern wont work because different types of DAO's will not all implement the same interfaces. And how should my Connection Management work if i might be connecting to any number of Databases simultaneously. I should have a connectionPool for each type Database i might connect to? I just want to do this as proper as possible, so i ask for opinions....
Thanks in advance
Greg B
[ March 09, 2005: Message edited by: Greg Belyea ]