- 
        1. Re: Reflection Error with MBeanServer Invokeadrian.brock Sep 12, 2002 6:30 AM (in response to mcahill)You haven't defined your signature. 
 Object[] arr = {new LogManager()};
 String[] sig = {LogManager.class.toString()};
 Object result = mbs.invoke(obn, "addManager", arr, sig);
 Regards,
 Adrian
- 
        2. Re: Reflection Error with MBeanServer Invokejuha Sep 12, 2002 7:41 AM (in response to mcahill)yeah you're missing the signature in your invoke() method (the last 'null' arg) 
 So its trying to invoke addManager() not addManaged(LogManager)
- 
        3. Re: Reflection Error with MBeanServer Invokemcahill Sep 12, 2002 12:51 PM (in response to mcahill)To quote Homer Simpson "Doh!". Thanks guys, I knew it was something obvious. 
 Mike
- 
        4. Re: Reflection Error with MBeanServer Invokemcahill Sep 12, 2002 3:56 PM (in response to mcahill)Thanks for the responses guys. I am now facing a 'parameter class could not be found' error. I am assuming this is because my class, LogManager only exists in my ear file (both in a jar and a war in the ear) and is not on the classpath and therefore not available to the classloader used in the MBeanServer. 
 Maybe if I explain what I am trying to achieve, somebody can guide me as to the best way to accomplish that.
 I would like my app to be self-contained in a single ear file. This includes any MBeans that may be needed for monitoring, management etc. I want my app to register its MBeans as it starts up so it can just be depoyed with no external dependancies.
 So as you may have guessed, I have a log manager and I want it to be managed via JMX. No big deal so far. However the log manager class is reused in both my war file and a jar file so there are two instances of it loaded up. I want both instances to be managed by the same MBean so I can switch off all logging hence my code to have the LogManagers register themselves with the existing MBean. Which leads to the problem stated above.
 Is there a way to have classes register themselves with a central MBean for management as they come up but without the classes beaing available on the classpath?
 Hope that makes sense and thanks in advance
 Mike
- 
        5. Re: Reflection Error with MBeanServer Invokejuha Sep 13, 2002 7:49 AM (in response to mcahill)You need to package your MBeans and ears and wars into a JBoss SAR (service archive) format. See the 'Getting Started' guide for details. 
 -- Juha
 
    