db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: CREATE FUNCTION with SQL examples ?
Date Sat, 18 Dec 2004 01:10:41 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suavi Ali Demir wrote:

> To clarify: You shoul NOT close the connection that
> you get from the URL jdbc:default:connection. This is
> not a new connection. This is the connection that your
> stored proc or function is running in the context of.
> It was created by the code that is executing the sq

No, that is incorrect.

It is safe and correct to close the connection obtained through the JDBC
URL jdbc:default:connection. The connection object returned is in the
same transaction space as the calling SQL statement. If you think about
it, a non-embedded database system such Oracle or DB2 cannot return a
reference to the Connection object used by the application, because it
is a different process on possibly a different machine.

- From the SQL spec (part 13)

default connection: a JDBC connection to the current SQL-implementation,
SQL-session, and SQLtransaction
established with the data source URL 'jdbc:default:connection'.


Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBw4ORIv0S4qsbfuQRAhjpAJ9PwznPzr1WQThZ9YmRJhU7OCvZrwCeI27Y
A73i1qX7a9SU7KXtEf1Q2aw=
=NQfJ
-----END PGP SIGNATURE-----


Mime
View raw message