// need to store the version storage root directly into the persistence manager
if (!pMgr.exists(historiesId)) {
NodeState root = pMgr.createNew(historiesId);
root.setParentId(systemId);
root.setNodeTypeName(NameConstants.REP_VERSIONSTORAGE);
PropertyState pt = pMgr.createNew(new PropertyId(historiesId, NameConstants.JCR_PRIMARYTYPE));
pt.setMultiValued(false);
pt.setType(PropertyType.NAME);
pt.setValues(new InternalValue[]{InternalValue.create(NameConstants.REP_VERSIONSTORAGE)});
root.addPropertyName(pt.getName());
ChangeLog cl = new ChangeLog();
cl.added(root);
cl.added(pt);
pMgr.store(cl);
}
// check for jcr:activities
if (!pMgr.exists(activitiesId)) {
NodeState root = pMgr.createNew(activitiesId);
root.setParentId(systemId);
root.setNodeTypeName(NameConstants.REP_ACTIVITIES);
PropertyState pt = pMgr.createNew(new PropertyId(activitiesId, NameConstants.JCR_PRIMARYTYPE));
pt.setMultiValued(false);
pt.setType(PropertyType.NAME);
pt.setValues(new InternalValue[]{InternalValue.create(NameConstants.REP_ACTIVITIES)});
root.addPropertyName(pt.getName());
ChangeLog cl = new ChangeLog();