Hello,
After checking that in our PRO AEM environment the active sessions number is increasing over the time, we have performed a small test. Basically, from an external application we are modifying the content and every modification is performed between a lock-unlock block. Surprisingly, every lock operation creates a new active session that is not released neither after unlocking nor after logging out. We track the number of active sessions using the AEM monitory tool (http://localhost:4502/libs/granite/operations/content/monitoring/page.html ). ¿Is there a way to release all those active sessions?
Regards.
This is the test code we are using for AEM 6.2 using Apache OAK 1.4.1:
import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.jcr.lock.Lock;
import javax.jcr.lock.LockManager;
import org.apache.jackrabbit.commons.JcrUtils;
import com.hpe.session.SessionManager;
public class JCRTestLock {
public static void main(String args[]) throws RepositoryException {
String url = "http://localhost:4502/crx/server";
String user = "admin";
String passwd = "admin";
String nodePath = "/content/dam/assets/2d8b4071-bd58-4d65-aa73-c0c5df5459123.png";
Repository repository = JcrUtils.getRepository(url);
SimpleCredentials credentials = new SimpleCredentials(user,
passwd.toCharArray());
Session session = repository.login(credentials, "crx.default");
Node node = session.getNode(nodePath);
LockManager lm = node.getSession().getWorkspace().getLockManager();
Lock lock;
for (int i = 0; i < 10; i++) {
lock = lm.lock(nodePath, true, false, 10, session.getUserID());
lm.unlock(nodePath);
}
session.logout();
}
}
Solved! Go to Solution.
Views
Replies
Total Likes
Can you raise a support ticket for this?
Views
Replies
Total Likes
Can you raise a support ticket for this?
Views
Replies
Total Likes
Sure,
The IT team has opened one.
Regards.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies