Access Application MBean via Jython?
Posted on 2010-11-23
Is it possible to access an application MBeans directly with a jython wsadmin script?
We have an application that has an MBean intended to refresh a small data cache. The original intent was to write a servlet /jsp that could be accessed to refresh the cache, but because we are in a clustered environment, we never know which appServer will be hit by the jsp, and can't specifically direct the request to one clone or the other, since we're using a load balanced address to get to the app.
I was "thinking" if we could access the mbean directly through wsadmin and direct our wsadmin script to hit the mbean on each appServer in the cluster, that might solve our issue.
Even if it's not the best way to address this particular issue, now I'm just curious if this can be done, and if so, I'd love to see an example of how.