* listener id, so we should create a new queue. We should let the old queue drain. If we were
* conencted to the failover, it would be best to finish sending items.
*/
public void resetEventQ()
{
ICacheEventQueue previousQueue = cacheEventQueue;
CacheEventQueueFactory fact = new CacheEventQueueFactory();
this.cacheEventQueue = fact.createCacheEventQueue( new CacheAdaptor( cache ), cache.getListenerId(), cache.getCacheName(),
cache.getAuxiliaryCacheAttributes().getEventQueuePoolName(), cache
.getAuxiliaryCacheAttributes().getEventQueueTypeFactoryCode() );
if ( previousQueue.isWorking() )
{
// we don't expect anything, it would have all gone to the zombie
if ( log.isInfoEnabled() )
{
log.info( "resetEventQ, previous queue has [" + previousQueue.size() + "] items queued up." );
}
previousQueue.destroy();
}
}