Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 769059FB4E7 for ; Thu, 22 Feb 2007 09:06:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 56881-04 for ; Thu, 22 Feb 2007 09:06:40 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 72E259FA616 for ; Thu, 22 Feb 2007 09:06:39 -0400 (AST) Received: (qmail 29987 invoked from network); 22 Feb 2007 13:06:35 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 22 Feb 2007 13:06:35 -0000 In-Reply-To: <6ec50dfd0702210747u7b38fe48x96ea5fe1bb06b33a@mail.gmail.com> References: <6ec50dfd0702210747u7b38fe48x96ea5fe1bb06b33a@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <31516617-4AE2-4D3D-BD16-4B8D8E854A43@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: JDBC object factory Date: Thu, 22 Feb 2007 08:06:34 -0500 To: Julius Stroffek X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/119 X-Sequence-Number: 16675 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