• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connectionpool Active connection

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please tell me the javacode that is,Iam using tomcat.jdbc.connectionpool.So using javacode how can i get how many connection running,sleeping and close and also active connection in program.

How can we confirm that how many connection active in program.I searched but not got any answer please tell me

Thanks
svn
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I expect you saw the documentation page here? http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html

Well, there's a code example near the bottom of that page. It creates a org.apache.tomcat.jdbc.pool.DataSource object; check out the API documentation for that class here: http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/DataSource.html.

If you look through that API documentation long enough (and there's a big list of methods to go through) you'll see there are methods like getNumActive(), getNumIdle(), and so on. Was that what you were looking for?
 
Shilpa Nandiv
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

I want to know about connection,when web application running it will use so many connection.But i want to no how many connection are using,and sleeping all information.So how can i get this information in program or some other method are there to check tomcat.apache.jdbc.connection pool.Please tell me

Thans
svn
 
Shilpa Nandiv
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using tomcat7 in that apache.jdbc.connectionpool.so using javacode i want to know

What I am looking for are the following items.

Show that there are defined number of active connections in the application.

Any additional request will add to the pool. If they get into sleep mode, the pool reduces back to predefined value.

Any release of connection will reduce from the pool.

An established connection stays connected until the started task is not completed.

so please tell me how can do.

thanks
svn
 
reply
    Bookmark Topic Watch Topic
  • New Topic