OK, I have been feverishly finishing this up. I believe this PR is ready. We now have a
java agent that can be used in the place of the agent subsystem.
All the unit tests and itests pass - I even have itests running against the javaagent so I
can say its working at least as well as the agent as a subsystem. The itests are
essentially a copy of the ones we have for the wildfly subsystem agent so I'm
exercising the javaagent in the same ways.
Two caveats that I can think of:
1) you can't run javaagent inside host controller directly. You have to run it as a
separate process (the javaagent can also run on in its own JVM via "java -jar
hawkular-javaagent.jar - it does not HAVE to be attached to some other JVM) and point to
the host controller remotely. If you want to run it inside Host Controller, use the
Hawkular WildFly Agent as a subsystem (i.e. use it like you do now with the original
2) The "local" DMR mode isn't really local - under the covers it is going
through the remote management endpoint so long as the WildFly EAP is configured on the
default 127.0.0.1:9990. If it is not, just configure the agent to talk to its local
WildFly as if it were a remote-dmr managed server.
To solve 1 we need the host controller to incorporate this enhancement:
To solve 2 I need to play games with classloading and JBoss Modules - I was given some
ideas from some folks. I plan to try something to get that to work.
This javaagent has JMX support. It talks local JMX API if local, and Jolokia REST if
remote. It supports cmdgw websocket command ExecuteOperationRequest to invoke JMX
operations (itests show this working). So we have full DMR and JMX support.
So this is ready for people to try out for non-EAP based products with JMX as their
management interface. Tom Cunningham is testing now. He already spotted a packaging issue
with sprintboot which he is figuring out - I'll let him explain if he has the energy
I think I can merge this soon, unless someone has reservations.
FWIW: the wildfly agent subsystem support remains intact and as it was. So that didn't
change and works like it always has (its itests are still there and passing so I know I
didn't break those :).