// since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
}
JMXRegistrar.registerMBean(
new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
);
}
this.indexReaderAccessor = new DefaultIndexReaderAccessor( this );
}