@Path( DOMAINS_PATH )
public Response listDomains() throws NullPointerException
{
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
String entity = JsonRenderers.DEFAULT.render( new JmxDomainListRepresentation(
server.getDomains() ) );
return addHeaders(
Response.ok( entity, JsonRenderers.DEFAULT.getMediaType() ) ).build();