462 ("jmxremote.ssl.need.client.auth", |
462 ("jmxremote.ssl.need.client.auth", |
463 "set com.sun.management.jmxremote.need.client.auth", "STRING", false), |
463 "set com.sun.management.jmxremote.need.client.auth", "STRING", false), |
464 |
464 |
465 _jmxremote_ssl_config_file |
465 _jmxremote_ssl_config_file |
466 ("jmxremote.ssl.config.file", |
466 ("jmxremote.ssl.config.file", |
467 "set com.sun.management.jmxremote.ssl_config_file", "STRING", false) |
467 "set com.sun.management.jmxremote.ssl_config_file", "STRING", false), |
|
468 |
|
469 // JDP Protocol support |
|
470 _jmxremote_autodiscovery |
|
471 ("jmxremote.autodiscovery", |
|
472 "set com.sun.management.jmxremote.autodiscovery", "STRING", false), |
|
473 |
|
474 _jdp_port |
|
475 ("jdp.port", |
|
476 "set com.sun.management.jdp.port", "INT", false), |
|
477 |
|
478 _jdp_address |
|
479 ("jdp.address", |
|
480 "set com.sun.management.jdp.address", "STRING", false), |
|
481 |
|
482 _jdp_source_addr |
|
483 ("jdp.source_addr", |
|
484 "set com.sun.management.jdp.source_addr", "STRING", false), |
|
485 |
|
486 _jdp_ttl |
|
487 ("jdp.ttl", |
|
488 "set com.sun.management.jdp.ttl", "INT", false), |
|
489 |
|
490 _jdp_pause |
|
491 ("jdp.pause", |
|
492 "set com.sun.management.jdp.pause", "INT", false) |
468 |
493 |
469 { |
494 { |
470 _dcmdparser.add_dcmd_option(&_config_file); |
495 _dcmdparser.add_dcmd_option(&_config_file); |
471 _dcmdparser.add_dcmd_option(&_jmxremote_port); |
496 _dcmdparser.add_dcmd_option(&_jmxremote_port); |
472 _dcmdparser.add_dcmd_option(&_jmxremote_rmi_port); |
497 _dcmdparser.add_dcmd_option(&_jmxremote_rmi_port); |
478 _dcmdparser.add_dcmd_option(&_jmxremote_login_config); |
503 _dcmdparser.add_dcmd_option(&_jmxremote_login_config); |
479 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_cipher_suites); |
504 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_cipher_suites); |
480 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols); |
505 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols); |
481 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth); |
506 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth); |
482 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file); |
507 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file); |
|
508 _dcmdparser.add_dcmd_option(&_jmxremote_autodiscovery); |
|
509 _dcmdparser.add_dcmd_option(&_jdp_port); |
|
510 _dcmdparser.add_dcmd_option(&_jdp_address); |
|
511 _dcmdparser.add_dcmd_option(&_jdp_source_addr); |
|
512 _dcmdparser.add_dcmd_option(&_jdp_ttl); |
|
513 _dcmdparser.add_dcmd_option(&_jdp_pause); |
483 } |
514 } |
484 |
515 |
485 |
516 |
486 int JMXStartRemoteDCmd::num_arguments() { |
517 int JMXStartRemoteDCmd::num_arguments() { |
487 ResourceMark rm; |
518 ResourceMark rm; |
522 // to jcmd override properties with the same name set by |
552 // to jcmd override properties with the same name set by |
523 // command line with -D or by managmenent.properties |
553 // command line with -D or by managmenent.properties |
524 // file. |
554 // file. |
525 #define PUT_OPTION(a) \ |
555 #define PUT_OPTION(a) \ |
526 if ( (a).is_set() ){ \ |
556 if ( (a).is_set() ){ \ |
527 options.print("%scom.sun.management.%s=%s", comma, (a).name(), (a).value()); \ |
557 options.print(\ |
|
558 ( *((a).type()) == 'I' ) ? "%scom.sun.management.%s=%d" : "%scom.sun.management.%s=%s",\ |
|
559 comma, (a).name(), (a).value()); \ |
528 comma[0] = ','; \ |
560 comma[0] = ','; \ |
529 } |
561 } |
530 |
562 |
531 PUT_OPTION(_config_file); |
563 PUT_OPTION(_config_file); |
532 PUT_OPTION(_jmxremote_port); |
564 PUT_OPTION(_jmxremote_port); |
539 PUT_OPTION(_jmxremote_login_config); |
571 PUT_OPTION(_jmxremote_login_config); |
540 PUT_OPTION(_jmxremote_ssl_enabled_cipher_suites); |
572 PUT_OPTION(_jmxremote_ssl_enabled_cipher_suites); |
541 PUT_OPTION(_jmxremote_ssl_enabled_protocols); |
573 PUT_OPTION(_jmxremote_ssl_enabled_protocols); |
542 PUT_OPTION(_jmxremote_ssl_need_client_auth); |
574 PUT_OPTION(_jmxremote_ssl_need_client_auth); |
543 PUT_OPTION(_jmxremote_ssl_config_file); |
575 PUT_OPTION(_jmxremote_ssl_config_file); |
|
576 PUT_OPTION(_jmxremote_autodiscovery); |
|
577 PUT_OPTION(_jdp_port); |
|
578 PUT_OPTION(_jdp_address); |
|
579 PUT_OPTION(_jdp_source_addr); |
|
580 PUT_OPTION(_jdp_ttl); |
|
581 PUT_OPTION(_jdp_pause); |
544 |
582 |
545 #undef PUT_OPTION |
583 #undef PUT_OPTION |
546 |
584 |
547 Handle str = java_lang_String::create_from_str(options.as_string(), CHECK); |
585 Handle str = java_lang_String::create_from_str(options.as_string(), CHECK); |
548 JavaCalls::call_static(&result, ik, vmSymbols::startRemoteAgent_name(), vmSymbols::string_void_signature(), str, CHECK); |
586 JavaCalls::call_static(&result, ik, vmSymbols::startRemoteAgent_name(), vmSymbols::string_void_signature(), str, CHECK); |