public synchronized Resource lock()
throws InvalidResourceException
{
lockCount++;
if (entry == null)
throw new InvalidResourceException(identifier,
"This reference was invalidate");
ResourceStore store = entry.getStore();
Resource resource = store.lookupResource(identifier);
if (debug) {
if (defs.get("context") == null)