Limit scope of doAsPrivileged JMX call