0
是否可以使用數組屬性定義MBean。我現在有一個MBean定義爲:JBoss MBeans:如何擁有一個數組屬性?
<mbean code="corp.app.jmx.DNSServer" name="corp.app:service=DNSServer">
<attribute name="Server">
192.168.0.1 192.168.0.2 192.168.0.3
</attribute>
</mbean>
在MBean代碼我然後分割字符串。但是 - 對於我的下一個MBean,我需要支持帶有空格的字符串。我可以做一個逗號分隔的,但我覺得肯定的MBean將對陣列的支持,這樣我可以將它們定義是這樣的:
<mbean code="corp.app.jmx.DNSServer" name="corp.app:service=DNSServer">
<attribute name="Server">
<item>192.168.0.1</item>
<item>192.168.0.2</item>
<item>192.168.0.3</item>
</attribute>
</mbean>
難道我錯了嗎?
顯然這個技巧不再適用於J-boss 7 – 2012-12-05 21:40:54