Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exposing a few methods using the Grails JMX plugin
class MyService {
static expose = ['jmx']
static jmxmethods = ['getTimeout', 'setTimeout']
static jmxexpose = ['excludeMethods':
MyService.metaClass.methods*.name.findAll{
!jmxmethods.contains(it)
}.join(',')]
int timeout
void nonJmxMethod() {
// stuff we shouldn't see from JMX
}
void anotherNonJmxMethod() {
// stuff we shouldn't see from JMX
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.