Created
October 30, 2012 02:38
-
-
Save jurberg/3977988 to your computer and use it in GitHub Desktop.
Exposing a few methods using the Grails JMX plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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