Hi Fabio,

> At page 248 of the Stripes book you used the following configuration
> in the persistence.xml file:

> I read the c3p0 manual
> (http://www.mchange.com/projects/c3p0/index.html), but still
> couldn't understand what these config items are about. More exactly,
> I would like to know why did you used these configurations for the
> webmail example?

My reference was "Java Persistence with Hibernate"[1]. These were the
default settings they used in their example. Here are their
explanations for the parameters:

> <!-- Configure the connection pool -->
> <property name="hibernate.c3p0.min_size" value="5"/>

This is the minimum number of JDBC connections that C3P0 keeps ready
at all times.

> <property name="hibernate.c3p0.max_size" value="20"/>

This is the maximum number of connections in the pool. An exception is
thrown at runtime if this number is exhausted.

> <property name="hibernate.c3p0.timeout" value="300"/>

You specify the timeout period (in this case, 300 seconds) after which
an idle connection is removed from the pool.

> <property name="hibernate.c3p0.max_statements" value="50"/>

A maximum of 50 prepared statements will be cached. Caching of
prepared statements is essential for best performance with Hibernate.

> <property name="hibernate.c3p0.idle_test_period" value="3000"/>
 
This is the idle time in seconds before a connection is automatically
validated.

> Hopefully next week I will deploy my very first Stripes app in the
> wild.  Want to thank you and everybody here for this accomplishment.

Congratulations! That is great to hear. Let us know how things go!

[1]: http://www.manning.com/bauer2/

Cheers,
Freddy
http://www.stripesbook.com

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to