Sorry - here is the XML
<server> <mbean code="com.xxx.platform.jmx.MonitoringService" name="xxx.monitoring:type=xxxMonitoring"> <attribute name="Property1">Property1</attribute> <attribute name="Property2">Property2</attribute> </mbean> </server>
you can package the mbean/impl classes in a ..SAR (its similar to an .EAR, check the docs) and either configure it internally with a jboss-service.xml or externally with a "-service.xml" file in the deploy directory. each way has its advantages.
i did something similar to this, where the .SAR was deployed with a jboss-service.xml internally, and then i wrapped that with an external mbean to schedule it (using the varia scheduler).
if you deploy your jar file in the [lib] dir, its bootstrapped at runtime and cannot be hot deployed/undeployed. which might be preferable. if its deployed as a .SAR, you can deploy/undeploy to your hearts content as long as your unbind/rebind methods are proper.