On 4/6/2018 6:46 AM, Martin Gainty wrote:

-Dcom.sun.management.jmxremote.ssl=$JMXSSL -Dzookeeper.jmx.log4j.disable=$JMXLOG4J 
     echo "JMX disabled by user request" >&2
MG>everything you need to setup JMX is located 

I know how to enable remote JMX when running a java program. I also know how to connect a JMX client like jconsole to that program.

What I was saying that I didn't know how to do was access data from JMX in a Java program that I've written myself.

Remote JMX seems like overkill, when all I want to know is what the ZK client that's part of my application is currently using as a maximum packet length.  Reading ClientCnxn.packetLen gets me what I was after.  It would have taken an extensive code review for me to find that particular field, so thank you for letting me know about it.

If the client has an increased jute.maxbuffer but the server doesn't, then there could still be a problem with writing data, but I'm not going to try and detect that.  In any case, I'm not going to abort the upload, I'm just logging a warning.


Reply via email to