public static StatsInstanceImpl createInstance ( String name , String configXmlPath , ObjectName userProvidedMBeanObjectName , boolean bCreateDefaultMBean , StatisticActions actionLsnr ) throws StatsFactoryException { PmiModuleConfig cfg = PerfModules . getConfigFromXMLFile ( configXmlPath , actionLsnr . getCurrentBundle ( ) ) ; if ( cfg == null ) { Tr . warning ( tc , "PMI0102W" , configXmlPath ) ; throw new StatsFactoryException ( nls . getFormattedMessage ( "PMI0102W" , new Object [ ] { configXmlPath } , "Unable to read custom PMI module configuration: {0}" ) + ". " + PerfModules . getParseExceptionMsg ( ) ) ; } StatsInstanceImpl instance = new StatsInstanceImpl ( name , cfg , actionLsnr ) ; //instance._scListener = scl; instance . _register ( userProvidedMBeanObjectName , bCreateDefaultMBean ) ; return instance ; }
Create singleton instance