{
ClientConnectionManager cm = null;
IIOPAddress address = null;
ClientConnection connection = null;
LocateRequestOutputStream lros = null;
LocateReplyReceiver receiver = null;
LocateReplyInputStream lris = null;
boolean result = false;
cm = ((org.jacorb.orb.ORB)orb).getClientConnectionManager ();
try
{
address = new IIOPAddress (host, port);
address.configure(configuration);
IIOPProfile iiopProfile = new IIOPProfile(address, object_key, ((org.jacorb.orb.ORB)orb).getGIOPMinorVersion());
iiopProfile.configure(configuration);
connection = cm.getConnection(iiopProfile);
}
catch(ConfigurationException e)
{
logger.error("Failed to configure", e);
}
if (this.logger.isDebugEnabled())
{
this.logger.debug("Pinging " + host + " / " + port);
}
try
{
lros = new LocateRequestOutputStream ( orb, object_key, connection.getId(), 2);
receiver = new LocateReplyReceiver();
receiver.configure (configuration);
connection.sendRequest(
lros,
receiver,
lros.getRequestId (),
true ); // response expected
lris = receiver.getReply();
switch (lris.rep_hdr.locate_status.value ())
{
case LocateStatusType_1_2._UNKNOWN_OBJECT:
case LocateStatusType_1_2._LOC_SYSTEM_EXCEPTION: