Collections.sort(resourcesToLog);
for (final Logs.LogResourceEndpointInfo resource : resourcesToLog) {
// Init and register MBeans
final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management")
.set("j2eeType", "JAX-RS")
.set("J2EEServer", "openejb")
.set("J2EEApplication", base)
.set("EndpointType", resource.type)
.set("name", resource.classname);
final ObjectName jmxObjectName = jmxName.build();
LocalMBeanServer.registerDynamicWrapperSilently(
new RestServiceMBean(resource),
jmxObjectName);
jmxNames.add(jmxObjectName);