0

In My project am using EclipseLink JPA and I have set minimum and maximum connections using c3p0 pooled data source.

I have passed c3p0 as a data source through spring bean in applicationContext.xml as follows,

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
.....
  <property name="dataSource" ref="pooledDataSource" />
.....
</bean>

 <bean id="pooledDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
    <property name="jdbcUrl" value="jdbc:sqlserver://XXX.XX.XX.XX:XXXX;databaseName=XXX" />
    <property name="user" value="XXX" />
    <property name="password" value="XXX" />

    <property name="minPoolSize" value="1" />
    <property name="maxPoolSize" value="100" />
</bean>

From this I need to monitor exact open connections.

  • 1
    Possible duplicate of [How to monitor c3p0 connections](https://stackoverflow.com/questions/4104125/how-to-monitor-c3p0-connections) – Neil Stockton Jun 29 '17 at 13:23
  • Possible duplication of [Asking C3P0 how many connections are in use](https://stackoverflow.com/questions/12725508/asking-c3p0-how-many-connections-are-in-use) – Perry Jun 29 '17 at 14:08
  • you can check both links https://stackoverflow.com/questions/4104125/how-to-monitor-c3p0-connections and https://amemon.wordpress.com/2007/07/15/monitoring-c3p0-using-jmxjconsole. Regards – Jackson William Feb 04 '18 at 23:02

0 Answers0