if (cf.getManagedConnectionFactory() != null && cf.getManagedConnectionFactory().getStatistics() != null) { StatisticsPlugin extendStats = cf.getManagedConnectionFactory().getStatistics(); extendStats.setEnabled(statsEnabled); if (extendStats.getNames().size() != 0) {
/** * String representation * @return The string */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ManagedConnectionFactory@").append(Integer.toHexString(System.identityHashCode(this))); sb.append("[instance=").append(getManagedConnectionFactory()); sb.append(" configProperties=").append(configProperties); sb.append(" statistics=").append(getStatistics()); sb.append("]"); return sb.toString(); } }
Set<String> excludeAttributes = new HashSet<String>(); for (org.jboss.jca.core.api.management.ConfigProperty mgtCp : mgtMcf.getConfigProperties()) getClassName(mgtMcf.getManagedConnectionFactory().getClass().getName()); DynamicMBean mcfDMB = JMX.createMBean(mgtMcf.getManagedConnectionFactory(), "Managed connection factory", writeable, if (mgtMcf.getStatistics() != null) getClassName(mgtMcf.getManagedConnectionFactory().getClass().getName()); excludeStatOperations.add("delta(.)*"); DynamicMBean mcfSDMB = JMX.createMBean(mgtMcf.getStatistics(), "Managed connection factory statistics", writeStatAttributes, null,
/** * Get the statistics * @return The value; <code>null</code> if no statistics is available */ public StatisticsPlugin getStatistics() { if (getManagedConnectionFactory() != null && getManagedConnectionFactory() instanceof Statistics) { return ((Statistics)getManagedConnectionFactory()).getStatistics(); } return null; }
/** * Constructor * @param cf The connection factory * @param mcf The managed connection factory instance */ public ConnectionFactory(Object cf, javax.resource.spi.ManagedConnectionFactory mcf) { this.connectionFactory = new WeakReference<Object>(cf); this.managedConnectionFactory = new ManagedConnectionFactory(mcf); this.pool = null; this.poolConfiguration = null; }
for (ConnectionFactory cf : connectionFactories) { ManagedConnectionFactory mcf = cf.getManagedConnectionFactory(); StatisticsPlugin extendStats = mcf == null ? null : mcf.getStatistics(); if (extendStats != null) { extendStats.setEnabled(statsEnabled);
if (cf.getManagedConnectionFactory() != null && cf.getManagedConnectionFactory().getStatistics() != null) { StatisticsPlugin extendStats = cf.getManagedConnectionFactory().getStatistics(); extendStats.setEnabled(statsEnabled); if (extendStats.getNames().size() != 0) {
for (ConnectionFactory cf : connectionFactories) { ManagedConnectionFactory mcf = cf.getManagedConnectionFactory(); StatisticsPlugin extendStats = mcf == null ? null : mcf.getStatistics(); if (extendStats != null) { extendStats.setEnabled(statsEnabled);