incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: About the DBDatabase instance opened in a web application
Date Mon, 23 Aug 2010 23:20:29 GMT
Oops, thats the answer to a different question but somehow still valid
as you should return your connection to the pool at the end of the
request.

You could have a look at the SampleRequest/SampleApplication in the
struts2 example but I have the impression that that example is not
that great as I uses one connection on application level which is not
what you should do on a production system.

Maybe I can add a wicket or plain servlet example one day...

These are all good questions :-) might add this one to the faq

Rainer?

Cheers,
Francis

On Tue, Aug 24, 2010 at 12:51 AM, Francis De Brabandere
<francisdb@gmail.com> wrote:
> Open and close on each request. For higher performance better have
> some kind of connection pool like c3po
> (http://http://sourceforge.net/projects/c3p0/) or apache commons dbcp
> or whatever pooling your appserver has/supports.
>
> Cheers,
> Francis
>
> On Tue, Aug 24, 2010 at 12:43 AM, exxos <hatufr@gmail.com> wrote:
>> Hi,
>>
>> Probably a "simple" question...
>>
>> For a web application, what is preferable?
>>
>> Keeping a DBDatabase instance opened (and attached to a driver)  in the
>> application session (as static for example) or open and close it each time a
>> db request?
>>
>>
>> Regards,
>> exxos.
>>
>
>
>
> --
> http://www.somatik.be
> Microsoft gives you windows, Linux gives you the whole house.
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message