Hi Keena,

At some point you may want to consider switching to HikariCP [1]. I don't
remember the exact numbers, but a couple years ago I switched a Cayenne
application from DBCP to HikariCP and the speed increase was noticeable.
The more faults (lazy loads) your application does fetching in
relationships, the more noticeable it'll be. Of course, if your application
is low-volume or doesn't have a lot of relationships, it might not be worth
the effort. HikariCP would be my first choice today for any non-trivial
application. Also, frameworks like Spring Boot default to using HikariCP
now, too, so it has become more popular.

mrg

[1] https://github.com/brettwooldridge/HikariCP


On Wed, Sep 8, 2021 at 10:36 PM Keena Grepo <keena.grepo...@gmail.com>
wrote:

> Hi,
>
> Is there any documentation that may serve as a reference on how to log the
> connection pool status/information for cayenne version 4.0?
>
> Here are the only information that is being logged once the web
> application has started to run on the server :
>
> 2021-09-09 09:22:58.288  INFO 25112 --- [           main]
> c.m.a.t.ServletInitializer               : Starting ServletInitializer
> v2.1.1.3 on CAVLT018 with PID 25112
> (C:\sts-bundle\pivotal-tc-server\instances\base-instance\wtpwebapps\MonitoringSystem\WEB-INF\classes
> started by Dev.User in C:\sts-bundle\sts-3.9.9.RELEASE)
> 2021-09-09 09:22:58.294  INFO 25112 --- [           main]
> c.m.a.t.ServletInitializer               : The following profiles are
> active: default
> 2021-09-09 09:23:01.851  INFO 25112 --- [           main]
> o.s.web.context.ContextLoader            : Root WebApplicationContext:
> initialization completed in 3351 ms
> 2021-09-09 09:23:03.651  INFO 25112 --- [           main]
> o.a.c.c.XMLDataChannelDescriptorLoader   : Loading XML configuration
> resource from
> file:/C:/sts-bundle/pivotal-tc-server/instances/base-instance/wtpwebapps/MonitoringSystem/WEB-INF/classes/cayenne-project.xml
> 2021-09-09 09:23:03.682  INFO 25112 --- [           main]
> o.a.c.c.XMLDataChannelDescriptorLoader   : Loading XML DataMap resource
> from
> file:/C:/sts-bundle/pivotal-tc-server/instances/base-instance/wtpwebapps/MonitoringSystem/WEB-INF/classes/datamap.map.xml
> 2021-09-09 09:23:04.107  INFO 25112 --- [           main]
> o.a.c.c.server.DataDomainProvider        : setting DataNode 'datanode' as
> default, used by all unlinked DataMaps
> 2021-09-09 09:23:10.374  INFO 25112 --- [           main]
> org.apache.cayenne.log.JdbcEventLogger   : Detected and installed adapter:
> org.apache.cayenne.dba.mysql.MySQLAdapter
>
> Our goal is to get the number of active connections in the pool.
>
> Btw, the applciation is using
> factory="org.apache.cayenne.configuration.server.DBCPDataSourceFactory" in
> the cayene-project.xml file.
>

Reply via email to