Code / rocks to read JMX ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Code / rocks to read JMX ?

Laurent FAILLIE
Hello,

I wonder if there is a way to read JMX data from Lua ?
I did some search but the few I found is forking a java sub process, solution I would like to avoid for performances purposes.

Thanks

Laurent
Reply | Threaded
Open this post in threaded view
|

Re: Code / rocks to read JMX ?

Marc Balmer
Hi

> Am 30.08.2016 um 09:46 schrieb Laurent FAILLIE <[hidden email]>:
>
> Hello,
>
> I wonder if there is a way to read JMX data from Lua ?
> I did some search but the few I found is forking a java sub process, solution I would like to avoid for performances purposes.

I don’t know about JMX, but when we had to use Java stuff, we created a module (in C) that creates and
controls a JVM instance (not in a separate process) using the Java native interface (JNI).  That works like
a charm and is not to complicated to implement.  You should then be able to run JMX stuff in the JVM
and query whatever you need from Lua.


Reply | Threaded
Open this post in threaded view
|

Re: Code / rocks to read JMX ?

Laurent FAILLIE
Hi,


Interesting : is this code viewable somewhere ?

Thanks

Laurent


Le Mardi 30 août 2016 10h01, Marc Balmer <[hidden email]> a écrit :


Hi

> Am 30.08.2016 um 09:46 schrieb Laurent FAILLIE <[hidden email]>:
>
> Hello,
>
> I wonder if there is a way to read JMX data from Lua ?
> I did some search but the few I found is forking a java sub process, solution I would like to avoid for performances purposes.


I don’t know about JMX, but when we had to use Java stuff, we created a module (in C) that creates and
controls a JVM instance (not in a separate process) using the Java native interface (JNI).  That works like
a charm and is not to complicated to implement.  You should then be able to run JMX stuff in the JVM
and query whatever you need from Lua.