Package com.sun.enterprise.admin.util

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


        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

  // 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

    }

    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

Related Classes of com.sun.enterprise.admin.util.JMXConnectorConfig

Copyright © 2018 www.massapicom. 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.