Hi Chris,

Since I have a lot of code in pljava DEFAULT_CONNECTION is
a compatibility trick. In oralce or postgres stored java funcions you
have do access your database with a jdbc connection string like
jdbc:default:connection. To get such a connection in H2 you have to
enable this feature.

To make your Java functions work in H2 you will need to modify your code a little. Let's say you have a function foo:

public static String foo(String bar) {
Connection conn = DriverManager.getConnection("jdbc:default:connection");
    /* do some stuff with connection */
    return someResult;
}

For H2 foo needs to look like this:

public static String foo(Connection conn, String bar) {
    /* do some stuff with connection */
    return someResult;
}

If the first parameter of the function is a Connection, then H2 will supply the equivalent of the "jdbc:default:connection" connection automatically (no need to set properties).

Regards,
Peter

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to