private boolean listenForDiscoveryMcRequests ( Configuration pConfig ) { // Check for system props, system env and agent config boolean sysProp = System . getProperty ( "jolokia." + ConfigKey . DISCOVERY_ENABLED . getKeyValue ( ) ) != null ; boolean env = System . getenv ( "JOLOKIA_DISCOVERY" ) != null ; boolean config = pConfig . getAsBoolean ( ConfigKey . DISCOVERY_ENABLED ) ; return sysProp || env || config ; }
For war agent needs to be switched on