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

JDBC object factory

From: "Julius Stroffek" <julo(at)stroffek(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: JDBC object factory
Date: 2007-02-21 15:47:33
Message-ID: 6ec50dfd0702210747u7b38fe48x96ea5fe1bb06b33a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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?
2.) Would it be worthwhile to implement such a feature and spent some time
on it? Is anybody interested?
3.) Are there any processes described for integrating patches?

Thank you for your advices.

Regards

Julo

Responses

pgsql-jdbc by date

Next:From: Raghavendra MBDate: 2007-02-22 06:20:01
Subject: Class Cast Exception for DataSource
Previous:From: Altaf MalikDate: 2007-02-21 15:33:23
Subject: Re: DatabaseMetaData.getCatalogs()

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