-
1. Re: Questions about standard MBean Example
gorano Jun 3, 2004 10:12 PM (in response to maroni)Put the comm-files in the following JDK directories:
j2sdk/jre/lib/javax.comm.properties
j2sdk/jre/lib/ext/comm.jar
j2sdk/jre/lib/i386/win32com.dll (or equivalent for linux)
You can access an MBean remotely, but normal usage is to use the MBean as a framework for your application. Gives you a nice way
of running applications that can be controlled and monitored via the
JMX console. A bonus is also that you get persistence for your
parameters.
Create a thread in the start method and place your application
specific code within this thread.
/G
/G -
2. Re: Questions about standard MBean Example
maroni Jun 7, 2004 3:46 AM (in response to maroni)Thanks for the reply, but it still does not work. I had already put all these files into the correct directory, but I still get a NoClassDefFound exception when deploying my mbean. But the same code works in my standalone client appliciation.
Seems as if JBoss needs a special hint to know where to look for the classes, I don´t know.
When I add the comm.jar file to my mbean SAR, then it works, but sorry, this cannot be the right way to do so???
What about the MBean access from a client? So you say that it´s possible to use the MBean directly, without using an adapter, but you don´t say how this can be done. Would be nice to know. Please tell me.
And what about the HashMap access?? -
3. Re: Questions about standard MBean Example
gorano Jun 7, 2004 10:19 PM (in response to maroni)I am using the comm library for serial port communication from an MBean. My MBean code do not have any problems to find the classes.
Play around with it a bit more!
You can make the MBean an RMI object or use the RMIAdapter.
I also saw something in the Admin documents about client access
to MBeans using an invoker.
/G