-
1. Re: Pool statistics and MC4J
juha Oct 3, 2002 7:21 PM (in response to vorlon)By default MC4J is able to monitor only attributes exposed in the mbean's interfaces... sooo, the only graph statistics you can get are the of the attributes you can see with the jmx-console.
In general, it's up to each individual developer what they expose in terms of management attributes. -
2. Re: Pool statistics and MC4J
cepage Oct 3, 2002 7:33 PM (in response to vorlon)The MBeans for Entity Bean containers contain a getCacheSize method that returns an integer. This would be ideal for plotting in MC4J, except that this method is exposed as an operation rather than attribute.
Any reason we shouldn't patch this MBean to use CacheSize as an attribute?
Corby -
3. Re: Pool statistics and MC4J
juha Oct 4, 2002 8:39 AM (in response to vorlon)I see no reason why not but I'm not responsible of that piece of code. Which MBean is this, a JSR-77 one?
-- Juha -
4. Re: Pool statistics and MC4J
cepage Oct 4, 2002 1:03 PM (in response to vorlon)I don't believe this is JSR-77. The declaration is:
public class EntityContainer
extends Container
implements ContainerInvokerContainer, InstancePoolContainer, StatisticsProvider
I don't see any references to J2EEManagedObject.
The relevant code is where it creates the MBeanInfo:
opInfo[superOpInfoCount] =
new MBeanOperationInfo(
"getCacheSize",
"Get the Container cache size.",
noParams,
"java.lang.Integer",
MBeanOperationInfo.INFO);
(Later, a handler exists in invoke(...) to process the method.)
So I believe I just have to replace this code to create an MBeanAttributeInfo, and create an implementation of getAttribute(...) to handle it, and we are good to go, yes?
Corby -
-
6. Re: Pool statistics and MC4J
cepage Oct 7, 2002 11:17 AM (in response to vorlon)Patch submitted to Sourceforge.
-
7. Re: Pool statistics and MC4J
vorlon Oct 7, 2002 12:29 PM (in response to vorlon)Thanks! This was very quick. I am impressed :-) I will try to apply the patch...