in yoko-core/src/main/java/org/apache/yoko/orb/CORBA/Delegate.java [914:1045]
void _OB_handleException(org.omg.CORBA.Object self, Exception ex,
RetryInfo info, boolean ignoreRebind, boolean useTSS) {
try {
throw ex;
} catch (org.apache.yoko.orb.OB.LocationForward e) {
synchronized (this) {
org.apache.yoko.orb.OB.CoreTraceLevels coreTraceLevels = orbInstance_
.getCoreTraceLevels();
//
// Check the Rebind Policy
//
// TODO: NO_REBIND should raise exception as well if
// LocationForward changes client effective QoS policies
//
if (policies_.rebindMode == org.omg.Messaging.NO_RECONNECT.value
&& !ignoreRebind) {
if (coreTraceLevels.traceRetry() > 0) {
logger.fine("retry: can't try again, because "
+ "NO_RECONNECT prevents a transparent "
+ "location forward");
}
throw new org.omg.CORBA.REBIND();
}
//
// Check for a potential infinite forwarding loop.
// The maximum is currently hard-coded to 10. If
// this is changed, also change the exception
// description for the minor code.
//
info.hop++;
if (info.hop > 10) {
if (coreTraceLevels.traceRetry() > 0) {
logger.fine("retry: location forward hop count exceeded");
}
throw new org.omg.CORBA.TRANSIENT(
org.apache.yoko.orb.OB.MinorCodes
.describeTransient(org.apache.yoko.orb.OB.MinorCodes.MinorLocationForwardHopCountExceeded),
org.apache.yoko.orb.OB.MinorCodes.MinorLocationForwardHopCountExceeded,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
}
//
//
// Change the IOR
//
IOR_ = e.ior;
if (e.perm) {
origIOR_ = e.ior;
}
//
// We need to reget the downcall stub
//
downcallStub_ = null;
//
// The object may have changed from remote to local
//
checkLocal_ = true;
if (coreTraceLevels.traceRetry() > 0) {
logger.fine("retry: trying again because of location forward");
}
}
if (useTSS) {
setRetry(info);
}
} catch (org.apache.yoko.orb.OB.FailureException e) {
info.retry++;
//
// If it's not safe to retry, throw the exception
//
checkRetry(info.retry, e.exception, false);
org.apache.yoko.orb.OB.CoreTraceLevels coreTraceLevels = orbInstance_
.getCoreTraceLevels();
if (coreTraceLevels.traceRetry() > 0) {
String msg = "trying again (" + info.retry
+ ") because of failure";
String exMsg = e.exception.getMessage();
if (exMsg != null) {
msg += "\n" + exMsg;
}
logger.fine("retry: " + msg);
}
if (useTSS) {
setRetry(info);
}
} catch (org.omg.CORBA.TRANSIENT e) {
info.retry++;
//
// If it's not safe to retry, throw the exception
//
checkRetry(info.retry, e, true);
org.apache.yoko.orb.OB.CoreTraceLevels coreTraceLevels = orbInstance_
.getCoreTraceLevels();
if (coreTraceLevels.traceRetry() > 0) {
String msg = "trying again (" + info.retry
+ ") because server sent a TRANSIENT " + "exception";
String exMsg = e.getMessage();
if (exMsg != null) {
msg += "\n" + exMsg;
}
logger.fine("retry: " + msg);
}
if (useTSS) {
setRetry(info);
}
} catch (org.omg.CORBA.SystemException e) {
logger.log(java.util.logging.Level.FINE, "Received SystemException", e);
throw e;
} catch (org.omg.CORBA.UserException e) {
org.apache.yoko.orb.OB.Assert._OB_assert(e); // should never
// happen
} catch (java.lang.RuntimeException e) {
logger.log(java.util.logging.Level.FINE, "Received RuntimeException", e);
throw e;
} catch (java.lang.Exception e) {
org.apache.yoko.orb.OB.Assert._OB_assert(e); // should never
// happen
}
}