Map<String, Object> attrs = new HashMap<String, Object>();
attrs.put(RepositoryImpl.REFRESH_INTERVAL, 0);
// TODO OAK-803: Backwards compatibility of long-lived
// sessions
// Remove dependency on implementation specific API
RepositoryImpl repo = (RepositoryImpl) OakSlingRepository.this.getRepository();
return repo.login(null, null, attrs);
}
}, null);
} catch (PrivilegedActionException e) {
throw new RepositoryException("failed to retrieve admin session.", e);
}