Thanks Andrus. We are facing a "java.lang.OutOfMemoryError: unable to create new native thread" on a cayenne call under tomcat. Need to dig into that, using JMX to monitor stuff.... HikariCP quite useful for such task.
And i forgot to mention that this pre-production tomcat instance is running cayenne ..... 3.1.2. So no ServerRuntime.builder() available for this case. -- Sébastien. ------------------------------------------------------------------------ *De :* Andrus Adamchik <and...@objectstyle.org> *Envoyé :* Jeudi, 07/02/2019 15:47 (PM +0100) *À :* User <user@cayenne.apache.org> *Objet :* Re: HikariCP & Cayenne > Hi Sébastien, > > Cayenne works with any DataSource, including HikariCP. > > Some environments support it out of the box. E.g. Bootique [1], where you'd > drop "bootique-jdbc-hikarcp" in your POM [2], and configure the connection > info in the YAML [3], and off you go. > > In the most general case, you create an instance of > com.zaxxer.hikari.HikariDataSource on your own, and pass it over to Cayenne > runtime builder: > > HikariDataSource ds = new HikariDataSource(); > ds.setJdbcUrl("jdbc:mysql://localhost:3306/db"); > ds.setUsername("u"); > ds.setPassword("p"); > > ServerRuntime cayenne = ServerRuntime.builder().dataSource(ds).build() > > Andrus > > [1] https://github.com/bootique-examples/bootique-cayenne-demo > [2] > https://github.com/bootique-examples/bootique-cayenne-demo/blob/master/pom.xml#L56 > [3] > https://github.com/bootique-examples/bootique-cayenne-demo/blob/master/src/main/resources/config.yml#L2 > >> On Feb 7, 2019, at 5:32 PM, Sébastien Pérès-Labourdette >> <sebastien.peres-labourde...@omerin.com> wrote: >> >> Hi all. >> >> I wish i could delegate connection pooling to this guy. >> Anybody did this before ? >> >> Any howto to achieve that ? >> >> - Sébastien >>
signature.asc
Description: OpenPGP digital signature