Skip site navigation (1) Skip section navigation (2)

Re: JDBC object factory

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Julius Stroffek <julo(at)stroffek(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC object factory
Date: 2007-02-22 13:06:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
On 21-Feb-07, at 10:47 AM, Julius Stroffek wrote:

> Hello All,
> I am thinking of implementing a JDBC object factory which will  
> create correct jdbc object instances at runtime depending on java  
> version the application is running on.
> The interface should look like
> interface JDBCObjectFatory {
> public static Connection createConnection(some prameters);
> public static Connection createStatement(some parameters);
> ... etc
> }
> And the corresponding implementations should be JDBC2ObjectFactory,  
> JDBC3ObjectFactory and JDBC4ObjectFactory.
> For each JDBC version the corresponding set of objects might be  
> available. The appropriate inheritance relations might be in place  
> where the implementations of the methods common to more JDBC  
> version will be implemented only in the super class (due to object  
> factory).
> As I am new to posgres jdbc driver I would like to ask some questions:
> 1.) What do you think of the idea?
Why would you want to do this ? Just get the correct jar(s) and use  
the code the way it is.
> 2.) Would it be worthwhile to implement such a feature and spent  
> some time on it? Is anybody interested?
Well other than the obvious problem of even building it since each  
jdbc interface is different for each compiler. Again I"m wondering why ?
> 3.) Are there any processes described for integrating patches?
send context diffs against CVS
> Thank you for your advices.
> Regards
> Julo

In response to

pgsql-jdbc by date

Next:From: Blakely, Jerel (Mission Systems)Date: 2007-02-23 01:08:30
Subject: Re: Problem with jdbc connection behavior
Previous:From: Heikki LinnakangasDate: 2007-02-22 10:58:03
Subject: Re: Class Cast Exception for DataSource

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group