public static StatsInstanceImpl createGroupInstance ( String name , StatsGroup igroup , 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 ( ) ) ; } StatsGroupImpl group = ( StatsGroupImpl ) igroup ; StatsFactoryUtil . checkDataIDUniqueness ( group , cfg ) ; // construct path String [ ] parentPath = group . getPath ( ) ; String [ ] path = new String [ parentPath . length + 1 ] ; for ( int i = 0 ; i < parentPath . length ; i ++ ) { path [ i ] = parentPath [ i ] ; } path [ parentPath . length ] = name ; StatsInstanceImpl instance = new StatsInstanceImpl ( name , cfg , path , actionLsnr ) ; //instance._scListener = scl; instance . _register ( userProvidedMBeanObjectName , bCreateDefaultMBean ) ; return instance ; }
Create instance under group