Examples of JMXConnectorConfig


Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

    private String getHostNameForServerInstance(ConfigContext ctx,
                                String serverName) throws LbReaderException
    {
        try {
            JMXConnectorConfig info =
                ServerHelper.getJMXConnectorInfo(ctx, serverName);
            String host = info.getHost();
            return host;
        } catch (Exception e){
            String msg = _localStrMgr.getString("GetHostNameFailed");
            throw new LbReaderException(msg,e);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

   
    protected MBeanServerConnectionInfo findConnectionInfo(ConfigContext configContext, String instanceName)
        throws AgentException
    {
        try {
            JMXConnectorConfig config = ServerHelper.getJMXConnectorInfo(configContext,
                instanceName);           
            return new MBeanServerConnectionInfo(config);
        } catch (Exception ex) {
            throw new AgentException(ex);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

            // config context
            ConfigContext cCtx = sc.getConfigContext();

            // jmx connector information
            JMXConnectorConfig jcc =
                ServerHelper.getJMXConnectorInfo(cCtx, instanceName);

            // jmx service url
            JMXServiceURL url = JmxServiceUrlFactory.forRmiWithJndiInAppserver(
                jcc.getHost(), Integer.parseInt(jcc.getPort()));

            // domain name
            String domainName =
                ServerHelper.getAdministrativeDomainName(cCtx, instanceName);

            // true when server is DAS
            boolean isDAS = ServerHelper.isDAS(cCtx, instanceName);

            // user data
            Hashtable userData = new Hashtable();
            userData.put(HOST_KEY, jcc.getHost());
            userData.put(PORT_KEY, jcc.getPort());
            userData.put(USER_KEY, jcc.getUser());
            userData.put(PASSWORD_KEY, jcc.getPassword());
            userData.put(PROTOCOL_KEY, jcc.getProtocol());
            userData.put(SystemPropertyConstants.SERVER_NAME, instanceName);
            userData.put(DOMAIN_NAME_KEY, domainName);
            userData.put(IS_DAS_KEY, new Boolean(isDAS));

            // jmx system connector certificate
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

     */
    protected MBeanServerConnectionInfo findConnectionInfo(ConfigContext configContext,
        String nodeAgentName) throws AgentException
    {
        try {           
            JMXConnectorConfig config = NodeAgentHelper.getJMXConnectorInfo(configContext,
                nodeAgentName);           
            return new MBeanServerConnectionInfo(config);
        } catch (Exception ex) {
            throw new AgentException(ex);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

        if (adminUser == null || adminPassword == null || hostProp == null) {
            throw new ConfigException(_strMgr.getString("missingInstanceConnectorAuth",
                instanceName));
        }

        return new JMXConnectorConfig(hostProp.getValue(), port,                
            adminUser, adminPassword, connector.getProtocol());
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

  // fix me
  // move this code to a common place which is being worked on by Kedar

  // connection info
  JMXConnectorConfig jcc = getJMXConnectorInfo(configContext, instanceName);

  // url
  JMXServiceURL url = null;
  /* Currently this is totally hacked code. - May 2004.
     This should clearly use a pool of connectors.
     The pool of connectors should be created early in the life cycle.
  */
  try {
    url = JmxServiceUrlFactory.forRmiWithJndiInAppserver
    (jcc.getHost(), Integer.parseInt(jcc.getPort()));
  }
  catch(final Exception e) {
    throw new RuntimeException(e);
  }

  final Map env = new HashMap();
  // add user and password based on Abhijit's patch
  env.put(JMXConnector.CREDENTIALS, new String[] {jcc.getUser(), jcc.getPassword()});
  // connection
  JMXConnector conn = JMXConnectorFactory.connect(url, env);

  return conn;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

    }

    private String getHostNameForServerInstance(ConfigContext ctx,
        String serverName) throws LbReaderException {
        try {
            JMXConnectorConfig info = ServerHelper.getJMXConnectorInfo(ctx,
                    serverName);
            String host = info.getHost();

            return host;
        } catch (Exception e) {
            String msg = _localStrMgr.getString("GetHostNameFailed");
            throw new LbReaderException(msg, e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.