private boolean checkConfig ( BundleContext context ) throws Exception { ServiceReference serviceRef = context . getServiceReference ( ConfigurationAdmin . class . getName ( ) ) ; ConfigurationAdmin cfgAdmin = ( ConfigurationAdmin ) context . getService ( serviceRef ) ; Configuration config = cfgAdmin . getConfiguration ( "org.talend.esb.sam.agent" ) ; return "true" . equalsIgnoreCase ( ( String ) config . getProperties ( ) . get ( "collector.lifecycleEvent" ) ) ; }
Check config .