Subject Re: [IB-Java] JDBC connections again
Author David Jencks
On 2001.11.23 22:20:58 -0500 David Warnock wrote:
> Hi all,
>
> I want to start using the new client-java. But the applications I need
> to start with must be able to switch between Postgresql, SQL Server and
> Firebird. This means I have to use "Old style" jdbc connection methods.

Well, actually there is another alternative.. you could wrap the legacy
jdbc drivers in a jca wrapper. There are at least 2: the Sun blackbox jdbc
wrappers, which are the closest thing Sun supplied to a reference
implementation, and the Minerva/jboss ones, available from the jboss site.
If you need many connections I would seriously investigate this, since it
is straightforward to add pooling to this setup.
>
> We have a good connection pool that has proved stable over many years.

Did you write it or is it available in some way?
>
> So for a number of reasons I am unable to jump to JCA (even if
> intellectually I would like to).
>
> Hence, I need support for old style connections as a migration tool.
Well, see above.
>
> I am happy to write code to do this, I am happy to fit in with David's
> requirements to not disturb the clean JCA architecture. So I guess I
> need 2 things
>
> 1. The FBUnmanaged connection to work correctly with autocommit

There are plenty of autocommit problems even with the jca stuff, I have
learned. The spec authors added some stuff about this in the final
release. I need to take a look at this. It should result in autocommit
working for unmanaged connections as well. We may be able to eliminate the
unmanaged connection as a separate entity.
>
> 2. A way of providing a connection so that the following will work.
>
> Class.forName(interbase.interclient.Driver);
>
> java.util.Properties connectionProperties =
> new java.util.Properties ();
> connectionProperties.put ("charSet", "UTF8");
> connectionProperties.put ("user", "sysdba");
> connectionProperties.put ("password", "masterkey");
>
> con = ( DriverManager.getConnection("url",
> connectionProperties) );

Well, as written you are asking for interclient;-).

I'm not sure it's possible to set the charSet in this way, but I believe
the rest works. Look in org.firebirdsql.jdbc.TestUnmanagedConnection.java
for examples.
>
>
>
> Have I understood correctly? Where should I be looking (as an
> experienced java coder who has not looked inside any database driver)?
>
> Thanks
>
> Dave
>
>
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>