Closed GoogleCodeExporter closed 9 years ago
Should be type 'Enhancement'
Original comment by 518Gi...@gmail.com
on 13 Jun 2011 at 3:54
Sql monitoring should be already supported with bonecp.
So I suppose that "support bonecp" means "extract informations on the
connection pool such as max connections"?
Original comment by evernat@free.fr
on 13 Jun 2011 at 4:27
I'm not seeing sql monitoring with bonecp 0.7.0, and I was seeing it with DBCP.
But yes additional info such as max connections and connections used is
desirable.
Original comment by 518Gi...@gmail.com
on 13 Jun 2011 at 7:46
Then, can you say how was configured dbcp and how is configured bonecp now?
Original comment by evernat@free.fr
on 13 Jun 2011 at 8:06
Sure I saved the old config in a comment. I'm just noticing perhaps its
because i disabled jmx?
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://url"/>
<property name="username" value=""/>
<property name="password" value=""/>
<property name="maxActive" value="8"/>
<property name="maxIdle" value="8"/>
</bean>
<bean id="mainDataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql://host/schema"/>
<property name="username" value="username"/>
<property name="password" value="password"/>
<property name="maxConnectionsPerPartition" value="50"/>
<property name="minConnectionsPerPartition" value="1"/>
<property name="partitionCount" value="2"/>
<property name="acquireIncrement" value="3"/>
<property name="transactionRecoveryEnabled" value="false"/>
<property name="releaseHelperThreads" value="0"/>
<property name="connectionTestStatement" value="/* ping *\/ SELECT 1"/>
<property name="disableConnectionTracking" value="true"/>
<property name="disableJMX" value="true"/>
</bean>
Original comment by 518Gi...@gmail.com
on 13 Jun 2011 at 8:25
I'm also bouncing it off of Spring's lazy init, which is different from when I
was using DBCP...
<bean id="dataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<ref local="mainDataSource"/>
</property>
</bean>
Original comment by 518Gi...@gmail.com
on 13 Jun 2011 at 8:26
I used <property name="disableJMX" value="false"/> and removed
LazyConnectionDataSourceProxy but I still do not see Sql stats for bonecp.
Original comment by 518Gi...@gmail.com
on 13 Jun 2011 at 8:39
Try with:
statisticsEnabled --> true
Also bump bonecp to 0.7.1.RELEASE
Original comment by wwa...@gmail.com
on 15 Jun 2011 at 1:17
Hi Wallace,
Just a question: is there a particular reason in bonecp to suggest trying
statisticsEnabled or to suggest bumping bonecp to 0.7.1.RELEASE?
Have you tried javamelody by any chance?
For all: monitoring of sql requests and monitoring of active/used jdbc
connections in javamelody is not related to JMX and so JMX is not supposed to
have any effect on these.
At the moment when reading the above config, I do not see any problem (with and
without LazyConnectionDataSourceProxy) preventing the monitoring of sql
requests.
I suppose that you have included
"classpath:net/bull/javamelody/monitoring-spring.xml" in your spring context,
as it was working before.
Emeric
Original comment by evernat@free.fr
on 17 Jun 2011 at 9:04
I was not including "classpath:net/bull/javamelody/monitoring-spring.xml"
because I am not monitoring my spring methods. I have included this in my
config and now I do see sql stats for bonecp. Still would be nice to see the
additional connection info though (max/used connections). Thanks for the help
so far, and great tool, I love it!
Original comment by 518Gi...@gmail.com
on 17 Jun 2011 at 10:17
Re version change: plenty of issues were fixed in 0.7.1
Sorry misunderstood re stats - my bad
Original comment by wwa...@gmail.com
on 17 Jun 2011 at 5:49
So sql monitoring works with bonecp and it was an invalid issue.
(I have added "additional bonecp info" into
http://code.google.com/p/javamelody/wiki/TODO)
Thanks
Original comment by evernat@free.fr
on 23 Jun 2011 at 10:18
Original issue reported on code.google.com by
518Gi...@gmail.com
on 13 Jun 2011 at 3:53