Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3421714
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:08:01+00:00 2026-05-18T06:08:01+00:00

I am using Hibernate in my JBoss war, using c3p0 for connection pooling, both

  • 0

I am using Hibernate in my JBoss war, using c3p0 for connection pooling, both configured within a hibernate.cfg.xml config file in my classpath

<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>

I’ve seen server.log generates lines with interesting information about the connection pool:

DEBUG [com.mchange.v2.resourcepool.BasicResourcePool] trace com.mchange.v2.resourcepool.BasicResourcePool@63f5e4b6 [managed: 10, unused: 9, excluded: 0]

For my monitoring pool (I am using nagios) I’d like to provide a JSP telling how many connections are being used and how many are free, as the log file says.

How can I ask c3p0 how many managed and unused connections are there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:08:02+00:00Added an answer on May 18, 2026 at 6:08 am

    You can monitor your connection pool(s) via JMX. From the documentation:

    Configuring and Managing c3p0 via JMX

    If JMX libraries and a JMX
    MBeanServer are available in your
    environment (they are include in JDK
    1.5 and above), you can inspect and configure your c3p0 datasources via a
    JMX administration tool (such as
    jconsole, bundled with jdk 1.5). You
    will find that c3p0 registers MBeans
    under com.mchange.v2.c3p0, one with
    statistics about the library as a
    whole (called C3P0Registry), and an
    MBean for each PooledDataSource you
    deploy. You can view and modify your
    DataSource’s configuration properties,
    track the activity of Connection,
    Statement, and Thread pools, and reset
    pools and DataSources via the
    PooledDataSource MBean. (You may
    wish to view the API docs of
    PooledDataSource for
    documentation of the available
    operations.)

    By the way, there seem to be JMX plugins for Nagios, you’re not forced to use a JSP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Hibernate in a Java application to access my Database and it
I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates.
I'm using Hibernate for ORM of my Java app to an Oracle database (not
So I'm using hibernate and working with an application that manages time. What is
I'm using hibernate validator framework with Spring. A class implementing the Spring Validator validates
We are using Hibernate 3.1 with Spring MVC 2.0. Our problem occurs when data
I'm using Hibernate with Spring in my application. I have been consistently using detached
I'm using hibernate 3 and want to stop it from dumping all the startup
I am using Hibernate 3.x, MySQL 4.1.20 with Java 1.6. I am mapping a
I'm using Hibernate's implementation of JPA and am seeing poor performance as multiple SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.