I have deployed the very simple standard MBean example of the JBoss Administration and 
Development Book (3.2.3) which binds a HashMap into JNDI, and then I played with it 
around, but I got some problems. So here are my questions:

1. The HashMap was successfully bound into JNDI, and I can see my service on the JMX 
console. Then I wrote a client which does a lookup on the HashMap, as follows:
        map = (HashMap) getContext().lookup("inmemory/maps/MapTest2");

Seems to be okay, because I donÂt get any NamingException. But how can I use the 
HashMap then? How can I access the content now? When I want to use the map, I get a 
NullPointerException. Why is it null??

2. I would like to call functions on my mbean, from a client or another mbean. Do I 
have to use an adapter for that, or can I access the mbean directly via JNDI?? How can 
I give my mbean a JNDI name?

3. In the mbeanÂs start() method I tried to create a serial connection to a PLC. But  
when I deploy the SAR file, the usage of the classes for the serial communication 
causes a NoClassDefFoundError Exception. But I added the javax.comm package to my 
Eclipse project, and when I put the same serial port access code into my client 
application (within the same project), it works and I donÂt get any exception. So why 
canÂt my mbean find these classes? Do I have to add something to the descriptor file??

I would really like to use my mbean...




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

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


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to