[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster-devel] Working with MBeanServer in xmlBlaster
Arghad Arnaout wrote:
Hallo ..
I was playing arround to check how I can build a monitoring tool based
on the MBeanServer in xmlBlaster, and I found my self stuck in non
well documented api org.xmlBlaster.client.jmx, so here what I have
tried to do and I hope someone helps me in this issue....
1- I have tried to run the example in org.xmlBlaster.jmxgui.Main, but
it stucks and does not execute.
This code is not maintained anymore. It was once written by a student
for a diploma thesis
and since then was not actively maintained by him.
If you reactivate it we will add your patches,
regards
Marcel
2- I tried to figure out what is the problem and I found the following:
When the method getMBeanInfo executes in the class ConnectorClient it
hangs in the following lines (107,108):
RequestBroker = new ObjectName(name);
mbInfo = (MBeanInfo) aServer.getMBeanInfo(RequestBroker).get();
Here the method getMBeanInfo() returns a callback-object:
org.xmlBlaster.client.jmx.XmlBlasterCallback and the client
application will be stop here and not continue to the next statement.
Frankly I did the same thing in a stand-alone java application but I
could not move faster than this, here is the code:
1: I_XmlBlasterAccess con = utilGlob.getXmlBlasterAccess();
2: ConnectorFactory factory = ConnectorFactory.getInstance(utilGlob);
3: AsyncMBeanServer server = factory.getMBeanServer("127.0.0.1
<http://127.0.0.1>");
4: ObjectName requestBroker_name = new
ObjectName("xmlBlaster:name=xmlBlaster");
5: org.xmlBlaster.client.jmx.Callback callBackObj = (RequestBroker)
server.getObjectInstance(requestBroker_name);
6: this.requestBroker = callBackObj.get();
so the program will hang at line 5.
I tried the tool jconsole and it worked fine.
So the big question is why the factory
org.xmlBlaster.client.jmx.ConnectorFactory returns AsyncMBeanServer
instead of MBeanServer, I think if somebody aswers me to this
question, so we can pass over this problem, and if we should use
AsyncMBeanServer so how we can get the RequestBroker instance from it ???
Sorry for this long msg
Thank you very much.
Regards
ARGHAD