private void initializeGateway(GatewayImpl gatewayImpl) { //TODO Dan - make sure that the gateway is already //receiving updates by the time we iterate over the region here. TXStateInterface currentState = suspendTX(); Region<Object, Object> r = getIdToType(); try { for(Map.Entry<Object, Object> typeEntry: r.entrySet()) { EntryEventImpl event = EntryEventImpl.create( (LocalRegion) r, Operation.UPDATE, typeEntry.getKey(), typeEntry.getValue(), new GatewayEventCallbackArgument((Object)null), false, cache.getMyId()); try { event.setEventId(new EventID(cache.getSystem())); gatewayImpl.distribute(EnumListenerEvent.AFTER_UPDATE, event); } finally { event.release(); } } } finally { resumeTX(currentState); } }