db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1051) A new method in CommonDataSource added which is not present in jdbc4 stub classes
Date Tue, 28 Feb 2006 00:54:56 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1051?page=comments#action_12368054 ] 

Rick Hillegas commented on DERBY-1051:
--------------------------------------

Hi Anurag,

Thanks for tracking this flexing of the JDBC4 spec. As I understand it, the vacuous wrapper
and query object methods will be filled in when you submit patches for DERBY-940 and DERBY-942.

1) Unfortunately, you are forked here by single inheritance. There is no good way to solve
this problem. Of the bad ways to solve this problem, I would recommend following the inheritance
pattern already in the codeline. That is, since EmbeddedXADataSource extends EmbeddedDataSource,
I would make EmbeddedXADataSource40 extend EmbeddedDataSource40. You may need to create a
utility class in which to share behavior between the two XA classes.

Similarly, since EmbeddedConnectionPoolDataSource extends EmbeddedDataSource, I would make
EmbeddedConnectionPoolDataSource40 extend EmbeddedDataSource40.

And similarly for the network XA DataSources. Same inheritance pattern, same solution.

2) I think your comments could be beefed up to describe what the JDBC methods are supposed
to do. Admitedly, it's tiresome to parrot text that's already available in the java.sql and
javax.sql javadoc. However, more expansive comments would be a great favor to other developers
since our javadoc does not link to those packages. On the bright side, much of this remark
will be moot if you follow the inheritance pattern recommended above.

Thanks!

> A new method in CommonDataSource added which is not present in jdbc4 stub classes
> ---------------------------------------------------------------------------------
>
>          Key: DERBY-1051
>          URL: http://issues.apache.org/jira/browse/DERBY-1051
>      Project: Derby
>         Type: Improvement
>  Environment: all
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1051.diff
>
> A new method getQueryObjectGenerator is added in CommonDataSource. This effects all the
DataSource (XADataSource, PooledDataSource and DataSource). Because of this new method we
will need to have seperate classes for all the DataSouce Implementation for jdbc4 and privious
version as the return type QueryObjectGenerator is a class introduced in jdbc4.
> Spec allows the implementation to return null if no QueryObjectGenerator implementation
is provided by the driver.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message