-
1. Re: MyMBean depending on MyOtherMBean issues
peterj Feb 26, 2008 12:44 PM (in response to frankthetank)For the MyMBean, do you have a depends clause that references MyOtherMBean? If not, add one. If this doesn't help, If so, please post the *-service.xml files for both mbeans.
-
2. Re: MyMBean depending on MyOtherMBean issues
frankthetank Feb 27, 2008 2:38 AM (in response to frankthetank)Thanks for the reply.
Yes, I have the depends in the MyMBean's *-service.xml.
here are the contents:
MyOtherMBean jboss-service.xml<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="com.example.myothermbean.MyOtherMBean" name="com.example.myothermbean:service=MyOtherMBean"> <mbean> <description>MyOtherMBean</description> <class>com.example.myothermbean.MyOtherMBean</class> <operation> <description>JBoss lifecycle operation</description> <name>start</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>stop</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>create</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>destroy</name> <return-type>void</return-type> </operation> <attribute access='read-write' getMethod='getStarted' setMethod='setStarted'> <description>Server stated.</description> <name>Started</name> <type>boolean</type> </attribute> </mbean> </mbean> </server>
MyMBean<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="com.example.mymbean.MyMBean" name="com.example.mymbean:service=MyMBean"> <depends>com.example.myothermbean:service=MyOtherMBean</depends> <mbean> <description>MyMBean</description> <class>com.example.mymbean.MyMBean</class> <operation> <description>JBoss lifecycle operation</description> <name>start</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>stop</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>create</name> <return-type>void</return-type> </operation> <operation> <description>JBoss lifecycle operation</description> <name>destroy</name> <return-type>void</return-type> </operation> </mbean> </mbean> </server>
Again, thanks! -
3. Re: MyMBean depending on MyOtherMBean issues
peterj Feb 27, 2008 11:23 AM (in response to frankthetank)Which version of JBossAS are you using?
-
4. Re: MyMBean depending on MyOtherMBean issues
frankthetank Feb 28, 2008 3:25 AM (in response to frankthetank)4.2.2.GA standard binaries.
I had also thought it might have something to do with our edited verion of JBoss, but even a fresh one off the download server has the issues.
From the console I can see that the dependend ist started right before the provider.
Maybe it will help if I explain what the actual intention is:
I am writing some PoofOfConcepts and have two MBeans.
* ExtendedServer which is intended to extend the functionality of the JBOss ServerImpl MBean. All our clients currently listen and poll the ServerImpl MBean for the servers state. The state of the server and the notifications define if the clients can connect or not.
The ExtendedServer simply offers the ability to simulate server states and thus f.i. kick all the clients off the server for maintenance work.
* BroadcasterMBean registers itself onto the ExtendedServer and broadcasts the notifications it receives from the ExtendedServer into the Lan.
As each has it's own SAR the BroadcasterMBean depends on the ExtendedServer.
So maybe I am missing something else? -
5. Re: MyMBean depending on MyOtherMBean issues
dimitris Feb 28, 2008 6:44 AM (in response to frankthetank)You may want to take a look here, too:
http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController -
6. Re: MyMBean depending on MyOtherMBean issues
frankthetank Mar 4, 2008 5:57 AM (in response to frankthetank)Thanks Dimitris!
Though I still have my dependency problem.