Expand my Community achievements bar.

SOLVED

AEM 6.0 - Manually setting repository lock

Avatar

Level 2

Hi,

I read here - http://docs.adobe.com/docs/en/aem/6-0/administer/operations/backup-and-restore.html#How AEM Online Backup Works how the online backup process in its 4th iteration, locks the repository. Any write operations to the repository while it is locked are not lost or result in errors, but are simply paused till a time when the repository lock is released.

I was wondering if there is any way this repository locking and unlocking mechanism can be simulated via code.

-kunal

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

Avatar

Employee Advisor

Hi,

The API Scott was referring to is the JCR Locking API. In the online backup case of CRX 2.x the mentioned locking is a totally different thing. While on JCR level you lock nodes to prevent them from being modified, the repository lock locks the complete repository so a consistent state on disk can be reached which is used to backup the data on disk. So this works on a different level, and it isn't part of any public API, but a CRX 2.x (to be more specific: TarPM) internal implementation which is not exposed.

Therefor you cannot use it directly via code. But it is exposed by JMX (have a lock at the JMX console), so you can invoke it indirectly using JMX.

Jörg