Hi,

It appears that you have made the appropriate change.

XADataSource is not a user API, and in fact isn't a kind-of DataSource. It was misnamed (IMHO) from the beginning. An XADataSource is a factory that produces XAConnections, which are not Connections, but are chimeras (produced by an internal mating of an XAResource and a Connection). You might want to see if Derby's implementation also incorrectly has XAConnection extending Connection.

Craig

On May 11, 2006, at 1:09 PM, Rick Hillegas wrote:

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


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to