sun.management.jmxremote.ConnectorBootstrap Java Examples
The following examples show how to use
sun.management.jmxremote.ConnectorBootstrap.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Agent.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #2
Source File: Agent.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #3
Source File: Agent.java From hottub with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #4
Source File: Agent.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #5
Source File: Agent.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #6
Source File: Agent.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #7
Source File: Agent.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #8
Source File: Agent.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #9
Source File: Agent.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #10
Source File: Agent.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #11
Source File: Agent.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #12
Source File: Agent.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #13
Source File: Agent.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
Example #14
Source File: Agent.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #15
Source File: FileLoginModule.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #16
Source File: FileLoginModule.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #17
Source File: FileLoginModule.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #18
Source File: Agent.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #19
Source File: Agent.java From hottub with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #20
Source File: FileLoginModule.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #21
Source File: Agent.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #22
Source File: FileLoginModule.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #23
Source File: FileLoginModule.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #24
Source File: Agent.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #25
Source File: Agent.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #26
Source File: FileLoginModule.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #27
Source File: Agent.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }
Example #28
Source File: FileLoginModule.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialize this <code>LoginModule</code>. * * @param subject the <code>Subject</code> to be authenticated. * @param callbackHandler a <code>CallbackHandler</code> to acquire the * user's name and password. * @param sharedState shared <code>LoginModule</code> state. * @param options options specified in the login * <code>Configuration</code> for this particular * <code>LoginModule</code>. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = Util.cast(sharedState); this.options = options; // initialize any configured options tryFirstPass = "true".equalsIgnoreCase((String)options.get("tryFirstPass")); useFirstPass = "true".equalsIgnoreCase((String)options.get("useFirstPass")); storePass = "true".equalsIgnoreCase((String)options.get("storePass")); clearPass = "true".equalsIgnoreCase((String)options.get("clearPass")); passwordFile = (String)options.get("passwordFile"); passwordFileDisplayName = passwordFile; userSuppliedPasswordFile = true; // set the location of the password file if (passwordFile == null) { passwordFile = DEFAULT_PASSWORD_FILE_NAME; userSuppliedPasswordFile = false; try { System.getProperty("java.home"); hasJavaHomePermission = true; passwordFileDisplayName = passwordFile; } catch (SecurityException e) { hasJavaHomePermission = false; passwordFileDisplayName = ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME; } } }
Example #29
Source File: Agent.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); ConnectorAddressLink.unexportRemote(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; configProps = null; } }
Example #30
Source File: Agent.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static synchronized void stopRemoteManagementAgent() throws Exception { JdpController.stopDiscoveryService(); if (jmxServer != null) { ConnectorBootstrap.unexportRegistry(); // Attempt to stop already stopped agent // Don't cause any errors. jmxServer.stop(); jmxServer = null; } }