[jboss-user] [Management, JMX/JBoss] - Re: MyMBean depending on MyOtherMBean issues

FrankTheTank do-not-reply at jboss.com
Wed Feb 27 02:38:46 EST 2008


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!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132387#4132387

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132387



More information about the jboss-user mailing list