"Daniel L. Rall" wrote:
>
> John McNally wrote:
> >
> > Forgive me for being ignorant but where are the Map related classes ending
> > up? My guess is that you are leaving them associated with DBBroker. Is
> > this true?
> >
> > DBBroker was born as part of the connection pooling. The association with
> > the mapping classes was made later and I was thinking the association should
> > be broken and DBBroker assigned to connection pooling duties only, again.
> >
> > Please clue me in.
>
> I thought that you were hanlding the map classes and have done nothing
> with them. I agree that they should be split out...Rafal, can you
> expand the scheme that you proposed to cover the map classes as well?
OK. We should straighten the issues with these classes as much as
possible because this is the right moment for shuffling stuff around.
Today I had a look into the db stuff and here's what I've come up with:
DBBroker is a container for multiple ConnectionPools
(util.db.pool.ConnectionPool) and provides a Façade for them
getConnection(), getConncetion(String) and releaseConnection(DBConnection).
(util.db.pool.DBConnection). (It could be even called PooledConnection, as
in javax.sql, but changing it now would break code).
DBBroker.getDB() method is a façade over ConnectionPool class - hiding the class,
but exposing it's getDB() method, and should stay inside DBBrokerService.
DB interface, DBFactory and the implementation should be moved to
util.db.adapter package.
Now. The getDatabaseMap() method (along with deprecated ones) seems to
be seriously out of place here. The only connection I see is that it's
dealing with the databases in gneral. :)
I would like to suggest a following solution:
We should define services.db.MapBrokerService interface, with
acompanying TurbineMapBrokerService and TurbineMapBroker.
This service would provide a single access point repository of
named DatabaseMaps.
One more random thought: maybe we could have services.db.PoolBrokerService
instead services.db.DBBrokerService.
The old implementation util.db.pool.DBBroker should stay, the class should be marked
as deprecated and become a wrapper for services.db.TurbinePoolBroker and
services.db.TurbineMapBroker
If you have any comments, I'll be able to respond on Sunday.
Rafal
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]