Manuel L. Santillan | 295c199 | 2006-09-09 17:48:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This script demonstrates "invokeMBean" function. Instead |
| 3 | * of using MXBean proxy or script wrapper object returned by |
| 4 | * 'mbean' function, this file uses direct invoke on MBean. |
| 5 | * |
| 6 | * To use this particular script, load this script file in |
| 7 | * script console prompt and call resetPeakThreadCount(). |
| 8 | |
| 9 | */ |
| 10 | |
| 11 | /** |
| 12 | * Resets the peak thread count to the current number of live threads. |
| 13 | * |
| 14 | */ |
| 15 | function resetPeakThreadCount() { |
| 16 | return invokeMBean("java.lang:type=Threading", "resetPeakThreadCount", [], ""); |
| 17 | } |
| 18 | |