* @param nodeIdentifier
* @throws LockException
*/
private synchronized void internalLock(String sessionId, String nodeIdentifier) throws RepositoryException
{
CacheableSessionLockManager sessionLockManager = sessionLockManagers.get(sessionId);
if (sessionLockManager != null && sessionLockManager.containsPendingLock(nodeIdentifier))
{
LockData lockData = sessionLockManager.getPendingLock(nodeIdentifier);
// add to DB for first
LockJDBCConnection connection = null;
try
{
// write to database
connection = this.lockJDBCContainer.openConnection();
connection.addLockData(lockData);
connection.commit();
// if any SQL exception, that nothing should be placed to cache
Fqn<String> lockPath = makeLockFqn(lockData.getNodeIdentifier());
cache.put(lockPath, LOCK_DATA, lockData);
sessionLockManager.notifyLockPersisted(nodeIdentifier);
}
finally
{
if (connection != null)
{