-
1. Re: XMBean and SubscriptionList
dimitris Nov 8, 2007 3:44 AM (in response to alfred.rsa)Your xmbean descriptor should describe all operations/attribute that appear on your mbean interface, including:
<attribute access="read-write" getMethod="getSubscriptionList" setMethod="setSubscriptionList"> <description>The subscription list configuration/description> <name>SubscriptionList</name> <type>org.w3c.dom.Element</type> </attribute>
-
2. Re: XMBean and SubscriptionList
alfred.rsa Nov 8, 2007 3:45 AM (in response to alfred.rsa)Sorry, this is my xml
<subscription-list>
</subscription-list> -
3. Re: XMBean and SubscriptionList
alfred.rsa Nov 8, 2007 3:47 AM (in response to alfred.rsa)Last try...
<attribute name="SubscriptionList"> <subscription-list> <mbean name="FNB.Commercial.BFLo:service=FileEventListenerService"/> </subscription-list> </attribute>
-
4. Re: XMBean and SubscriptionList
dimitris Nov 8, 2007 11:13 AM (in response to alfred.rsa)This is the -service.xml descriptor you are showing, not the xmbean one. Better read the xmbean section in the FAQ:
http://wiki.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX
Or the section on how to write listener mbeans.
Why you are using xmbeans? -
5. Re: XMBean and SubscriptionList
alfred.rsa Nov 8, 2007 1:09 PM (in response to alfred.rsa)Hi Dimitris
Here is the rest of my config - I only showed the notifications.
I am using XMBeans because it seemed to be the most convenient way of adding method/parameter names and descriptions in the JMX console. I tried normal MBeans, dynamic and model mbeans as well. I like XMBeans the best. Should I not use them?<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_2.dtd"> <server> <mbean code="za.co.fnb.bflo.eventlistener.FileEventListenerService" name="FNB.Commercial.BFLo:service=FileEventListenerService" xmbean-dd="META-INF/FileEventListenerService.xml"> <depends>jboss.ejb3:service=EJB3Deployer</depends> <attribute name="ConfigurationFilename">FileEventListenerService.xml</attribute> </mbean> <mbean code="za.co.fnb.bflo.dispatcher.JMSEventDispatcherService" name="FNB.Commercial.BFLo:service=JMSEventDispatcherService" xmbean-dd="META-INF/JMSEventDispatcherService.xml"> <depends>jboss.ejb3:service=EJB3Deployer</depends> <depends>FNB.Commercial.BFLo:service=FileEventListenerService</depends> <attribute name="ConfigurationFilename">JMSEventDispatcherService.xml</attribute> <attribute name="SubscriptionList"> <subscription-list> <mbean name="FNB.Commercial.BFLo:service=FileEventListenerService"/> </subscription-list> </attribute> </mbean> </server> and <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mbean PUBLIC "-//JBoss//DTD JBOSS XMBEAN 1.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_2.dtd"> <mbean> <description>File listener event service</description> <class>za.co.fnb.bflo.dispatcher.JMSEventDispatcherService</class> <constructor> <description>Default constructor</description> <name>JMSEventDispatcherService</name> </constructor> <attribute access='read-write' getMethod='getConfigurationFilename' setMethod='setConfigurationFilename'> <description>MBean Attribute.</description> <name>ConfigurationFilename</name> <type>java.lang.String</type> </attribute> <operation> <name>start</name> </operation> <operation> <name>stop</name> </operation> </mbean>
-
6. Re: XMBean and SubscriptionList
dimitris Nov 8, 2007 1:17 PM (in response to alfred.rsa)XMBeans are fine. You just need to add the SubscriptionList attribute definition in the xmbean descriptor.
-
7. Re: XMBean and SubscriptionList
alfred.rsa Nov 8, 2007 2:56 PM (in response to alfred.rsa)Thanks - I did try that but I couldn't find an example of it, this is what I tried and it didn't work
<attribute access='read-write' getMethod='getSubscriptionList' setMethod='setSubscriptionList'> <description>MBean Attribute.</description> <name>SubscriptionList</name> <type>java.util.List</type> </attribute>
-
8. Re: XMBean and SubscriptionList
alfred.rsa Nov 8, 2007 3:27 PM (in response to alfred.rsa)I found my mistake, thanks for your patience.
The code should be<attribute access='read-write' getMethod='getSubscriptionList' setMethod='setSubscriptionList'> <description>MBean Attribute.</description> <name>SubscriptionList</name> <type>org.w3c.dom.Element</type> </attribute>