2013-02-21 12 views
6

インタフェースを実装するいくつかのBeanを作成し、MBeanエクスポータを作成してjconsoleに公開しました。 すべて正常に動作しますが、説明が正しく表示されません。jmx MBeanのクラス記述、属性の説明、および操作の説明を表示する方法

Java Class : $Proxy483 
Description : Information on the management interface of the MBean 

と属性と私は見操作の説明に:私は見豆の上部に

Operation exposed for management

は、私が@ManagedResourceに設定されている説明を参照してくださいする方法はあります注釈?事前

答えて

0

ありがとうございます(デフォルトはありません)あなたのMBeanExporterためJmxAttributeSourceの実装が必要になります。春reference次の例を提供します。

<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> 
    <property name="assembler" ref="assembler"/> 
    <property name="namingStrategy" ref="namingStrategy"/> 
    <property name="autodetect" value="true"/> 
</bean> 

<!-- Implementation of the JmxAttributeSource interface that reads JDK 1.5+ annotations and exposes the corresponding attributes --> 
<bean id="jmxAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/> 

<!-- will create management interface using annotation metadata --> 
<bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler"> 
    <property name="attributeSource" ref="jmxAttributeSource"/> 
</bean> 

<!-- will pick up the ObjectName from the annotation --> 
<bean id="namingStrategy" class="org.springframework.jmx.export.naming.MetadataNamingStrategy"> 
    <property name="attributeSource" ref="jmxAttributeSource"/> 
</bean> 
0

を使用すると、オブジェクトの名前と説明を提供しようとしたことがありますか?

@ManagedResource(
    objectName="org.springbyexample.jmx:name=ServerManager", 
    description="Server manager." 
) 
関連する問題