-
Aug 26th, 2005, 02:58 PM
#1
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
-
Aug 26th, 2005, 02:59 PM
#2
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.
-
Aug 28th, 2005, 03:23 PM
#3
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
-
Forum Rules