Hi Peter,

Here is a patch to avalon-components/facilities/jmx/test/conf/block.xml that causes 
the test component MBean to register properly with the MBeanServer.

The JmxManagementHandler has to be declared in the top level container so it has 
access to the test component. Also it has to be declared last in the block.xml, 
otherwise it will try to resolve components that have not yet been commissioned and 
cause an exception.

I will try to fix the behaviour so that it doesn't have to be declared as the last 
component, but at least now this setup should work to get some MBeans into the 
MBeanServer.

-Cameron

Index: block.xml
===================================================================
RCS file: /home/cvspublic/avalon-components/facilities/jmx/test/conf/block.xml,v
retrieving revision 1.1
diff -u -r1.1 block.xml
--- block.xml   5 May 2004 17:24:49 -0000       1.1
+++ block.xml   6 May 2004 18:48:18 -0000
@@ -4,14 +4,17 @@
       <repository>
         <resource id="avalon-framework:avalon-framework-api" version="4.1.5"/>
         <resource id="avalon-composition:avalon-composition-api" version="2.0.0"/>
+        <resource id="avalon-jmx:avalon-jmx-api" version="1.0.dev-0"/>
+        <resource id="avalon-jmx:avalon-jmx-handler" version="1.0.dev-0"/>
         <resource id="avalon-jmx:avalon-jmx-test" version="1.0.dev-0"/>
       </repository>
     </classpath>
   </classloader>
  
-  <include name="handler" id="avalon-jmx:avalon-jmx-handler" version="1.0.dev-0"/>
+  <include name="mx4j" id="avalon-jmx:avalon-jmx-mx4j" version="1.0.dev-0"/>
  
   <component name="test"  
class="org.apache.avalon.playground.jmxtest.JMXTestComponent"/>
  
+  <component name="handler" 
class="org.apache.avalon.jmx.handler.JmxManagementHandler"/>
 </container>
  


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to