* @return lock applied to the given resource or <code>null</code>
* @see LockManager#getLock(Type, Scope, DavResource)
* todo: is it correct to return one that specific lock, the current session is token-holder of?
*/
public ActiveLock getLock(Type type, Scope scope, TransactionResource resource) {
ActiveLock lock = null;
if (TransactionConstants.TRANSACTION.equals(type)) {
String[] sessionTokens = resource.getSession().getLockTokens();
int i = 0;
while (lock == null && i < sessionTokens.length) {
String lockToken = sessionTokens[i];