Subject | JDBC connections again |
---|---|
Author | David Warnock |
Post date | 2001-11-24T03:20:58Z |
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.
We have a good connection pool that has proved stable over many years.
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.
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
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) );
Have I understood correctly? Where should I be looking (as an
experienced java coder who has not looked inside any database driver)?
Thanks
Dave
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.
We have a good connection pool that has proved stable over many years.
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.
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
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) );
Have I understood correctly? Where should I be looking (as an
experienced java coder who has not looked inside any database driver)?
Thanks
Dave