// ordered cache item update and notification.
synchronized ( cacheDesc )
{
try
{
ICompositeCache c = ( ICompositeCache ) cacheDesc.cache;
//TODO; make this a bit less of a hack
// If the source of this request was from a cluster, then
// update the remote caches. COnsider it a local update.
// This requires that two local caches not be connected to
// two clustered remote caches. The failover runner will
// have to make sure of this. ALos, the local cache needs
// avoid updating this source. Will need to pass the source
// id somehow. The remote cache should udate all local caches
// but not update the cluster source. Cluster remote caches
// should only be updated by the server and not the RemoteCache.
// PUT LOGIC IN REMOTE CACHE
// WILL TRY UPDATING REMOTES
if ( fromCluster )
{
if ( log.isDebugEnabled() )
{
log.debug( "not updating clusters **************************************" );
}
c.update( item, ICache.REMOTE_INVOKATION );
}
else
{
if ( log.isDebugEnabled() )
{
log.debug( "updating clusters **************************************" );
}
c.update( item, ICache.LOCAL_INVOKATION );
}
}
catch ( Exception oee )
{
}
// UPDATE LOCALS IF A REQUEST COMES FROM A CLUSTER
// IF LOCAL CLUSTER CONSISTENCY IS CONFIGURED
ICompositeCache cache = ( ICompositeCache ) cacheDesc.cache;
if ( !fromCluster || ( fromCluster && rcsa.getLocalClusterConsistency() ) )
{
ICacheEventQueue[] qlist = getEventQList( cacheDesc, requesterId );