Bryan Pendleton wrote:
>
>> separate connections for each thread as I've noticed establishing
>> connection
>> in Derby takes a while,
>
> Another way to address this is to use connection pooling. Use a separate
> connection for each thread, but when a unit of work is complete, commit
> the connection's transaction, then return it to the pool, and re-acquire
> the connection again from the pool later when you are ready to perform
> the next unit of work.
>
> In my application, I have many (hundreds) of threads, each with their
> own connection to the database, but I very rarely have more than 10-12
> active connections because the connections are pooled and re-used among
> the various threads.
>
> thanks,
>
> bryan
>
>
>
Thanks for your response. This is definitely the way to go if performance is
an issue, but performance is not a issue for our app, and I just need to get
this app to work as quickly as possible, so I'm looking for a solution that
requires minimal change to the code. Please have a look at my response to
Knut
and see if any of my proposals are sound. Thanks a lot!
-
hai
--
View this message in context:
http://www.nabble.com/Does-using-DerbyDB-require-synchronization--tp19379460p19394591.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.