/**
* @throws Exception */
public void rendezvousWithDAS() throws Exception {
getLogger().log(Level.FINE, "Attempting to Rendezvous with DAS...");
DASPropertyReader dasReader=null;
String reportingUrl=null;
try {
// create JMXConnector to DAS using user and password as necessary
// call MBean to add this NodeAgent
NodeAgentPropertyReader naReader = getNodeAgentPropertyReader();
String agentName = getNodeAgentName();
dasReader = getDASPropertyReader();
ObjectName objname = new ObjectName(DAS_NODECONTROLLER_MBEAN_NAME);
int port=Integer.parseInt(dasReader.getPort());
String jmxProtocol = null;
//The secure property indicates whether we should initiate a
// secure connection to the DAS.
Boolean isDASSecure = new Boolean(dasReader.isDASSecure());
if (isDASSecure.booleanValue()) {
jmxProtocol = DefaultConfiguration.S1_HTTPS_PROTOCOL;
} else {
jmxProtocol = DefaultConfiguration.S1_HTTP_PROTOCOL;
}
final JMXServiceURL url =
new JMXServiceURL(jmxProtocol, dasReader.getHost(), port);
reportingUrl=url.toString();
getLogger().log(Level.INFO,
"nodeagent.attemptingRendezvousedWithDAS", url);
final JMXConnector conn =
JMXConnectorFactory.connect(url, initEnvironment(url));
MBeanServerConnection serverConn=conn.getMBeanServerConnection();
Object[] params = { naReader.getHost(), naReader.getPort(),
agentName, naReader.getProtocol(), naReader.getClientHost() };
String[] signature = {"java.lang.String", "java.lang.String",
"java.lang.String", "java.lang.String", "java.lang.String"};
Object oret = serverConn.invoke(objname, "rendezvousWithDAS",
params, signature);
if (oret == null) {
// problem with return from rendezvous, can't continue
getLogger().log(Level.SEVERE, "nodeagent.invalidRendezvous");
getLogger().log(Level.WARNING, "nodeAgent.stopping.agent");
System.exit(1);
}
reportingUrl=dasReader.getJMXURL();
if (bDebug)
System.err.println("BACK FROM HTTP CONNECT " + ((String)oret));
markAsBound((String)oret);
getLogger().log(Level.INFO, "nodeagent.rendezvousedWithDAS",
dasReader.getJMXURL());
} catch (RedirectException e) {
getLogger().log(Level.SEVERE,
_strMgr.getString("nodeAgent.invalidRedirectAttempted"));
throw e;