agent config problem

classic Classic list List threaded Threaded
2 messages Options
sekaijin sekaijin
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

agent config problem


I have trouble understanding the documentation to configure an agent.
I use ServiceMix.

for exemple
org.jolokia.detectorOptions An optional JSON representation for application specific options used by detectors for post-initialization steps. See Table 3.1, “Servlet init parameters” for details.

I've seen in “Servlet init parameters” the mimeType parameter
org.jolokia.detectorOptions={"mimeType": "application/json"}
work fine
but some others parameters can not be changed like policyLocation
org.jolokia.detectorOptions={"mimeType": "application/json", "policyLocation": "file://${karaf.etc}/jolokia-access.xml}
no access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed

in osgi agents section I've found org.jolokia.useRestrictorService false
Ok I can set to true. I've read the Section 4.1, “Policy based security”. All security options must be placed in a xml file. Where is this file ? I've not found any informations in documentation.
if I refer to the log, the file jolokia-access.xml seems to be that I seek and must be in the classpath of the bundle
 But in osgi Each bundle has its classLoader. I've not found haw to I fixe the path of this file.

more generally, some seem parameter allowed and not others. But I do not see anything that tells me that I can use.
with the agent osgi there are parameters true / false, but I can not find how to implement the config if I change the default value.
like org.jolokia.useRestrictorService true  how to define the restriction ? the Section 4.1, “Policy based security” provides information on the content, but not how to implement it.

org.jolokia.listenForHttpService false. "If true the bundle listens for an OSGi HttpService and if available registers an agent servlet to it." but if is false ??? haw to implement an http service in other port ?

org.jolokia.detectorOptions See Table 3.1, “Servlet init parameters” for details. but policyLocation => no effect, debug => no effect, mimeType => work fine

I do not read can not be properly documentation, but I have great difficulty understanding how I need to configure the agent.

roland roland
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: agent config problem

Sorry, the documentation is misleading here. "detectorOptions" are used only for configuring so called detectors which determines the server type the agent is running in. This is explained at the end of the "Servlet init parameters" sections.

Servlet init parameters themselve cannot be set with this options (so I really wonder why the mimeType setting works for you).

Instead you should use `org.jolokia.policyLocation` directly in the configuration. (In fact, every servlet init parameter can be specified this way, I need to be more clear about this in the documentation).

Sorry for the confusion ...
... roland