@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting ResourceAdapterStatusicService"); synchronized (this) { final CommonDeployment deploymentMD = deployment.getValue().getDeployment(); PathElement peExtendedStats = PathElement.pathElement(Constants.STATISTICS_NAME, "extended"); if (deploymentMD.getConnector() != null && deploymentMD.getConnector().getAdminObjects() != null) { for (AdminObject ao : deploymentMD.getConnector().getAdminObjects()) { if (ao.getStatistics() != null) { StatisticsPlugin extendStats = ao.getStatistics(); extendStats.setEnabled(statsEnabled); if (extendStats.getNames().size() != 0) { if (extendStats.getNames().size() != 0 && overrideRegistration.getSubModel(PathAddress.pathAddress(peExtendedStats)) == null) { overrideRegistration.registerSubModel(new StatisticsResourceDefinition(peExtendedStats, CommonAttributes.RESOURCE_NAME, extendStats)); } } } } } } }
PathAddress AO_ADDR = PathAddress.EMPTY_ADDRESS.append(Constants.ADMIN_OBJECTS_NAME); for (AdminObject ao : adminObjects) { StatisticsPlugin extendStats = ao.getStatistics(); if (extendStats != null) { extendStats.setEnabled(statsEnabled);
/** * String representation * @return The string */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("AdminObject@").append(Integer.toHexString(System.identityHashCode(this))); sb.append("[instance=").append(getAdminObject()); sb.append(" configProperties=").append(configProperties); sb.append(" statistics=").append(getStatistics()); sb.append("]"); return sb.toString(); } }
if (mgtAo.getStatistics() != null) excludeStatOperations.add("delta(.)*"); DynamicMBean aoSDMB = JMX.createMBean(mgtAo.getStatistics(), "Admin object statistics", writeStatAttributes, null,
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting ResourceAdapterStatusicService"); synchronized (this) { final CommonDeployment deploymentMD = deployment.getValue().getDeployment(); PathElement peExtendedStats = PathElement.pathElement(Constants.STATISTICS_NAME, "extended"); if (deploymentMD.getConnector() != null && deploymentMD.getConnector().getAdminObjects() != null) { for (AdminObject ao : deploymentMD.getConnector().getAdminObjects()) { if (ao.getStatistics() != null) { StatisticsPlugin extendStats = ao.getStatistics(); extendStats.setEnabled(statsEnabled); if (extendStats.getNames().size() != 0) { if (extendStats.getNames().size() != 0 && overrideRegistration.getSubModel(PathAddress.pathAddress(peExtendedStats)) == null) { overrideRegistration.registerSubModel(new StatisticsResourceDefinition(peExtendedStats, CommonAttributes.RESOURCE_NAME, extendStats)); } } } } } } }
PathAddress AO_ADDR = PathAddress.EMPTY_ADDRESS.append(Constants.ADMIN_OBJECTS_NAME); for (AdminObject ao : adminObjects) { StatisticsPlugin extendStats = ao.getStatistics(); if (extendStats != null) { extendStats.setEnabled(statsEnabled);