Foros de discusión
Two C3P0(DB) Connection Pool
M Kamran Saleem, modificado hace 7 años.
Two C3P0(DB) Connection Pool
New Member Mensajes: 5 Fecha de incorporación: 21/01/11 Mensajes recientes
Hello Everyone,
It has been observed that Liferay creates Two (C3P0) Pools by default. Any idea why Two pools are required or being used by Liferay?
Only ROOT application is deployed in my Tomcat/webapps. (No other application or Portlet) and using default C3P0 properties.
See an attached video of JConsole/MBeans.
Regards,
Kamran
It has been observed that Liferay creates Two (C3P0) Pools by default. Any idea why Two pools are required or being used by Liferay?
Only ROOT application is deployed in my Tomcat/webapps. (No other application or Portlet) and using default C3P0 properties.
See an attached video of JConsole/MBeans.
Regards,
Kamran
Archivos adjuntos:
Mika Koivisto, modificado hace 7 años.
RE: Two C3P0(DB) Connection Pool
Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
Liferay creates two datasources if you let it auto create them and you are not using existing connection pool from JNDI. Liferay creates another datasource for counter service to prevent deadlocks but I've never had any issues having just one that is configured as JNDI resource. I've blogged about how to configure c3p0 connection pool as JNDI resource in Tomcat.
Michael Chen, modificado hace 6 años.
RE: Two C3P0(DB) Connection Pool
New Member Mensaje: 1 Fecha de incorporación: 4/11/14 Mensajes recientes
This 2014 blog (Approach 2: JNDI) is a better choice. You only need to modify one file: TOMCAT/conf/context.xml.
https://web.liferay.com/web/pmesotten/blog/-/blogs/database-connection-pool-sharing-between-portal-and-portlets
https://web.liferay.com/web/pmesotten/blog/-/blogs/database-connection-pool-sharing-between-portal-and-portlets