AW: [opencms-dev] coonection pool
Andreas Schouten
Andreas.Schouten at framfab.de
Wed Jan 16 13:59:51 CET 2002
Hi,
> >If you want to use it now, you can checkout OpenCms from CVS-Repository
and
> >compile it yourself.
>
> Great! I will check it.
Here is a description, how to compile OpenCms with ant:
http://www.opencms.org/opencms/opencms/service/core.html
> I have still another question.
> I was trying to make DB connection using OpenCms pool
> as follows:
>
> Connection con =
> DriverManager.getConnection("jdbc:opencmspool:mysql");
> ...
> ...
>
> I failed to find a way how to create or configure pool for that
> database.
you can define your own pool in the opencms.properties like this:
pool.mypool.driver = org.gjt.mm.mysql.Driver
pool.mypool.url = jdbc:mysql://localhost:3306/mydatabase
pool.mypool.user = root
pool.mypool.password =
pool.mypool.minConn = 10
pool.mypool.maxConn = 20
pool.mypool.increaseRate = 5
pool.mypool.timeout = 120
pool.mypool.maxage = 360
After this you can connect like this:
Connection con =
DriverManager.getConnection("jdbc:opencmspool:mypool");
Regards,
Andreas
More information about the opencms-dev
mailing list