db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: DataSource class hierarchy in client
Date Mon, 02 May 2005 22:34:53 GMT
Daniel John Debrunner wrote:
> Jeremy Boynes wrote:
> 
>>The class hierarchy the client DataSources is:
>>
>>ClientBaseDataSource
>>  |
>>  +-- ClientDataSource
>>        |
>>        +-- ClientXADataSource
>>        |
>>        +-- ClientConnectionPoolDataSource
>>
>>The three standard interfaces DataSource, ConnectionPoolDataSource and
>>XADataSource are not related to each other with different
>>get??Connection methods that return different classes.
>>
>>I would like to propose refactoring this so that all three extend
>>ClientBaseDataSource directly which will mean moving some of the
>>properties from ClientDataSource down into the base class.
>>
>>Any thoughts on why this should not be done?
> 
> 
> No, but what are the reasons it should be done?
> 

As David Jencks pointed out, the interfaces being implemented don't 
really bear any relationship to each other so I would say this cleans up 
the model a bit. It also eliminates the chance of things like 
erroneously calling e.g getConnection() on a ClientXADataSource.

--
Jeremy

Mime
View raw message