String key = EndpointSupport.getUniqueKey(endpoint);
ComponentStats compStats = (ComponentStats) componentStats.get(endpoint.getComponentNameSpace().getName());
EndpointStats stats = new EndpointStats(endpoint, compStats.getMessagingStats());
endpointStats.putIfAbsent(key, stats);
// Register MBean
ManagementContext context= container.getManagementContext();
try {
context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
stats,
EndpointStatsMBean.class);
} catch (Exception e) {
log.info("Unable to register endpoint statistics MBean: " + e.getMessage());
if (log.isDebugEnabled()) {