new Object[] { serviceDelegate.getKey() });
}
return casReferenceId;
} else {
if ( !requestToCache.isSynchronousInvocation() && !sharedConnection.isOpen() ) {
Exception exception = new BrokerConnectionException("Unable To Deliver CAS:"+requestToCache.getCasReferenceId()+" To Destination. Connection To Broker "+getBrokerURI()+" Has Been Lost");
handleException(exception, requestToCache.getCasReferenceId(), null, requestToCache, true);
return casReferenceId;
} else {
// Add to the outstanding list.
// serviceDelegate.addCasToOutstandingList(requestToCache.getCasReferenceId());
// since the service is in time out state, we dont send CASes to it just yet. Instead, place
// a CAS in a pending dispatch list. CASes from this list will be sent once a response to PING
// arrives.
serviceDelegate.addCasToPendingDispatchList(requestToCache.getCasReferenceId(), aCAS.hashCode());
return casReferenceId;
}
}
}
SharedConnection sharedConnection = lookupConnection(getBrokerURI());
if ( !sharedConnection.isOpen() ) {
if (requestToCache != null && !requestToCache.isSynchronousInvocation() && aCAS != null ) {
aCAS.release();
}
throw new ResourceProcessException(new BrokerConnectionException("Unable To Deliver Message To Destination. Connection To Broker "+sharedConnection.getBroker()+" Has Been Lost"));
}
// Incremented number of outstanding CASes sent to a service. When a reply comes
// this counter is decremented
outstandingCasRequests.incrementAndGet();
// Increment total number of CASes sent to a service. This is reset