Subject Re: JDBC Type 4 Driver Status and final build for testing
Author jwcanada@yahoo.com
Roman,

Thank you for the information. However, in my test code, it always
raise exception in
Class.forName("org.firebirdsql.jdbc.FBDriver");

//java.lang.NoClassDefFoundError: javax/resource/ResourceException

If I replace it with interbase.interclient.Driver, it is fine.

Class.forName("interbase.interclient.Driver");

Any help?

jw

>
> type4 jdbc driver has two drivers inside: managed and unmanaged.
> managed is targeting the application servers, while unmanaged can
be
> used like any other JDBC driver. The code for getting the unmanaged
> connection should be like this:
>
> import java.sql.*;
> import java.util.*;
>
> ....
>
> Class.forName("org.firebirdsql.jdbc.FBDriver");
>
> String url =
> "jdbc:firebirdsql:localhost:c:/firebird/examples/employee.gdb"
>
> Properties dbInfo = new Properties();
> dbInfo.setProperty("user", "sysdba");
> dbInfo.setProperty("password", "masterkey");
>
> Driver driver = java.sql.DriverManager.getDriver();
> Connection connection = driver.connect(url, dbInfo);
>
>
>
> Later you can use standard JDBC calls. Note, that current
> implementation does not provide connection pooling, so you have to
do
> it by hands.
>
> Best regards,
> Roman Rokytskyy