db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From legolas wood <legola...@gmail.com>
Subject Re: is it a good practice to have several connections to an embedded DB
Date Mon, 30 Oct 2006 08:29:37 GMT
Thank you for your comments.
should i use a pooling library to open several connection on Embedded
Derby database or i can use normal method(Driver manager....) to do it ?

Daniel Jue wrote:
> If you mean several different connections, this should be fine.  I'm
> pretty sure that's how connection pooling works:  You have several
> (lets say 20) connections that are pre-established, and then those get
> handed out to other processes/services as needed, and then when those
> processess/services "close" the connection, it really just releases it
> back to the pool.  This is because setting up the initial connections
> can be time consuming.
> (Note for the following paragraph I do not have any connection pooling
> explicitly set up, I'm still working on how to do that...I am using
> Derby as an embedded DB, although the actual data lives at a location
> on my web app server, but outside the scope of my web application,
> i.e. C:\mydbdir\ .)
> Now, with one of my programs, using a jdbc connection, I use the
> "default" connection string, which I believe re-uses the existing
> connection.  For instance, I have a couple Java stored procedures for
> my Derby db, and sometimes one gets called from the other.  The
> sub-procedure uses a default connection.  It sure looks like I'm
> making a new connection, since I'm creating a new connection object,
> but my understanding is that it somehow re-uses an existing
> connection.
> Dan
> On 10/29/06, legolas wood 
> <legolas.w-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Hi
>> thank you for reading my post
>> is it a good practice to have several connections to an embedded DB ?
>> what will happen when we open several connections to an embedded DB ?
>> Thanks

View raw message