db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@gluecode.com>
Subject Re: JSR169 support
Date Mon, 04 Oct 2004 20:33:13 GMT
Daniel John Debrunner wrote:
> 
> Java functions and procedures that use SQL through server side JDBC
>   Can not support, the standard mechanism to get the JDBC connection in
> a procedure or function, uses the
> DriverManager.getConnection("jdbc:default:connection"). JSR 169 does not
> support the DriverManager class. Note that this standard default
> connection URL is specified by the SQL standard Part 13 and not by JDBC.
> 
> Derby system procedures that use server side SQL
>   Probably need to support, since they are internal they could use a
> private, non-standard mechanism to get the server side JDBC connection.
> 

How about a server-side DataSource? as in
   ServerDataSource ds = new ServerDataSource();
   Connection c = ds.getConnection();

which is no more proprietary than anything else that constructs a 
DataSource.

As an aside (and probably not SQL/JRT compliant) a potentially neat 
feature would be to support a singleton multi-threaded class rather than 
using static methods for prodecures. Then, when the instance is created, 
a DataSource could be injected by the DB; this would allow any class 
implemented this way to be independent of the actual database as all 
they would see is an instance of the DataSource interface.

--
Jeremy

Mime
View raw message