db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suavi Ali Demir <dem...@yahoo.com>
Subject Re: CREATE FUNCTION with SQL examples ?
Date Thu, 23 Dec 2004 06:12:46 GMT
So, does this mean Derby always launches a separate
thread to process a query? 

Regards,
Ali


--- Daniel John Debrunner <djd@debrunners.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Bernd Ruehlicke wrote:
> 
> > Hmm - this "jdbc:default:connection" is a little
> scary to me. Suppose my
> > Der by verison runs embedded in an application
> server which has multiple
> > connections open at any time to differnt databases
> - how dose the
> >
>
DriverManager.getConnection("jdbc:default:connection");
> know to give me
> > a connection to the Derby Database ?
> 
> It just does :-)
> 
> jdbc:default:connection is always intended to return
> a Connection object
> that is that is a proxy for the connection and
> transaction that is the
> SQL statement calling the function or procedure.
> Derby handles this by
> linking the connection to the current thread for the
> lifetime of the
> JDBC call by the application, e.g. during a
> PreparedStatement.executeQuery() or ResultSet.next()
> call. Then the
> Derby driver can find the Connection for the current
> thread through that
> mapping, when a request for jdbc:default:connection
> is made.
> 
> 
> > Or do I in such cases have to be explicit and use
> the explicit url to
> > the given Derby instance ?
> 
> No, because any connection obtained with a
> jdbc:derby: url would be in a
> different transaction space to the connection
> invoking the procedure or
> function.
> 
> Dan.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
>
iD8DBQFBylthIv0S4qsbfuQRAkdhAJ0bk5b4jiHE54kycFr4vlyvnxDo+gCgs2Yg
> YzDvDWgmAWk5vLSmBrdvJqY=
> =gpBT
> -----END PGP SIGNATURE-----
> 
> 


Mime
View raw message