protected Map < String , Object > prepareEnv ( Map < String , String > pTargetConfig ) { if ( pTargetConfig == null || pTargetConfig . size ( ) == 0 ) { return null ; } Map < String , Object > ret = new HashMap < String , Object > ( pTargetConfig ) ; String user = ( String ) ret . remove ( "user" ) ; String password = ( String ) ret . remove ( "password" ) ; if ( user != null && password != null ) { ret . put ( Context . SECURITY_PRINCIPAL , user ) ; ret . put ( Context . SECURITY_CREDENTIALS , password ) ; ret . put ( "jmx.remote.credentials" , new String [ ] { user , password } ) ; } return ret ; }
Override this if a special environment setup is required for JSR - 160 connection