Results 1 to 3 of 3

Thread: MBeanExporter and DataSource Opening Connections?

  1. #1
    Join Date
    Aug 2004
    Location
    Hawaii, US
    Posts
    225

    Default MBeanExporter and DataSource Opening Connections?

    Hello,

    I'm trying out the MBeanExporter to expose our DBCP pool. This works great to expose it as an MBean, and I can easily see it in jconsole.

    What seems odd is that every time I refresh (via the GUI) the number of active connections goes up by 2. I have done enough experimenting to be sure that it is not the result of some external usage. I am sure that by refreshing the mbean attributes, I am opening two connections and leaving them open.

    I'm imagining that by refreshing, it is running through all getters, and thus calling getConnection().

    Is there a way to selectively hide getters from a bean, so that they are not exposed by mbean attributes? That is, short of creating a read only interface for DataSource.

    Thanks!
    Seth

  2. #2
    Join Date
    Aug 2004
    Location
    Hawaii, US
    Posts
    225

    Default

    OK, sorry about that. I spoke way too soon.

    On further investigation, I found the lovely MethodNameBasedMBeanInfoAssembler. Bingo, just what I need.

    Thanks, and sorry for the noise.

  3. #3
    Join Date
    Aug 2004
    Location
    Hawaii, US
    Posts
    225

    Default

    Just for some closure on this topic, I submitted a new MBeanInfoAssembler implementation. This acts as the opposite of MethodNameBasedMBeanInfoAssembler, in that it provides a list of method names to ignore. All others are included.

    http://opensource2.atlassian.com/pro...rowse/SPR-1256

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •