transactionScheduler =
systemRegistry.getComponent(TransactionScheduler.class);
this.txnProxy = txnProxy;
taskOwner = txnProxy.getCurrentOwner();
ProfileCollector col =
systemRegistry.getComponent(ProfileCollector.class);
// Create our backing graph builder. We wrap this object so we
// can return a different type from findAffinityGroups.
builder = new SingleGraphBuilder(properties, systemRegistry,
txnProxy, false);
// Create our group finder and graph builder JMX MBeans
AffinityGroupFinderStats stats =
new AffinityGroupFinderStats(this, col, -1);
builderStats = new AffinityGraphBuilderStats(col,
builder.getAffinityGraph(),
periodCount, snapshot);
// We must set the stats before exporting ourself!
builder.setStats(builderStats);
try {
col.registerMBean(stats, AffinityGroupFinderMXBean.MXBEAN_NAME);
col.registerMBean(builderStats,
AffinityGraphBuilderMXBean.MXBEAN_NAME);
} catch (JMException e) {
// Continue on if we couldn't register this bean, although
// it's probably a very bad sign
logger.logThrow(Level.CONFIG, e, "Could not register MBean");