db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Proposal to change Derby's public api for XADataSource and ConnectionPoolDataSource
Date Thu, 11 May 2006 20:09:32 GMT
Dear Derby users,

Please read this message if you work on an application server or in an 
application layer which cares about distributed transactions and/or 
pooled connections.

Right now the inheritance graph for Derby's DataSources does not mirror 
the corresponding graph of interfaces in javax.sql. Derby's DataSources 
are classes which you will find in Derby's published javadoc for the 
package org.apache.derby.jdbc. In particular, Derby's XADataSources and 
ConnectionPoolDataSources implement the DataSource interface. This is so 
even though the javax.sql.XADataSource and 
javax.sql.ConnectionPoolDataSource interfaces themselves do not extend 
javax.sql.DataSource.

We believe this is confusing, particularly to developers who are trying 
to build applications which easily port across different vendors' JDBC 
implementations. We propose to rework the hierarchy of classes in 
org.apache.derby.jdbc so that our XADataSources and 
ConnectionPoolDataSources no longer implement javax.sql.DataSource. We 
propose to expose this change in Derby 10.2.

However, we do not want to make this change if it will break existing 
applications. Please let us know if you think this will break your app 
server or other Derby-powered application.

Thanks,
-Rick


-----------------------------------------------------------------------------------

Here is a bit more detail on the problem. This is the inheritance graph 
from javax.sql:

                     CommonDataSource
                       /          |           \                 
XADataSource DataSource ConnectionPoolDataSource

Here is the corresponding 10.1 graph from org.apache.derby.jdbc:

                    ClientDataSource
                           /           \
ClientXADataSource    ClientConnectionPoolDataSource

We propose the following 10.2 graph for org.apache.derby.jdbc

                             ClientBaseDataSource
                              /               |                \
ClientXADataSource ClientDataSource ClientConnectionPoolDataSource


Mime
View raw message