log.error("Unlocking context that wasn't unlocked in RR-Loop!: " + ec);
log.warn("Unlocking context that wasn't unlocked in RR-Loop!: " + ec);
    public static void unlockAllContextsForCurrentThread() {    	Vector ecs = (Vector)ERXThreadStorage.valueForKey(LockedContextsForCurrentThreadKey+Thread.currentThread().getName());    	ERXThreadStorage.removeValueForKey(LockedContextsForCurrentThreadKey+Thread.currentThread().getName());    	log.debug("unlockAllContextsForCurrentThread: " + Thread.currentThread().getName() + ", ecs: " + ecs);    	if(ecs != null && ecs.size() > 0) {    		// we can't use an iterator, because calling unlock() will remove the EC from end of the vector    		for (int i = ecs.size() - 1; i >= 0; i--) {    			EOEditingContext ec = (EOEditingContext) ecs.get(i);    			log.error("Unlocking context that wasn't unlocked in RR-Loop!: " + ec);    			try {    				ec.unlock();    			} catch(IllegalStateException ex) {    				log.error("Could not unlock EC!", ex);    			}    		}    	}    }