-
1. Re: Running agent plugins from Eclipse?
mazz May 29, 2014 4:40 PM (in response to raylite3)You can do one of two things:
1) start the agent with JPDA and debug by attaching Eclipse to a running agent. You turn on JPDA by uncommenting this line from rhq-agent-env.sh:
#RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,address=9797,server=y,suspend=n"
2) you can use the standalone plugin container - deploy your plugin in there and debug it via that way (again, attach Eclipse to it via JPDA)
Heiko wrote that - he has a demo from a few years ago: http://www.pilhuhn.de/hwr/misc/2009-03-20_2212.swf
And here is some more from his blog:
http://pilhuhn.blogspot.com/2009/03/working-on-standalone-plugincontainer.html
http://pilhuhn.blogspot.com/2009/04/i-love-standalone-container-in-jopr.html
-
2. Re: Running agent plugins from Eclipse?
genman May 29, 2014 7:34 PM (in response to mazz)My recommendation is to extend my 'ComponentTest' class, which you can find for some of the plugins in the RHQ tree, like mysql or the database plugin. You can see some examples there.
It is sort of a plugin container lite, meaning it will create your components and you can interact with them, e.g. get measurements or availability.