+
+ for (JackrabbitDataModelMigration dataModelMigration : new TreeSet<JackrabbitDataModelMigration>(
+ dataModelMigrations)) {
+ try {
+ if (session.itemExists(dataModelMigration
+ .getDataModelNodePath())) {
+ Node dataModelNode = session.getNode(dataModelMigration
+ .getDataModelNodePath());
+ dataModelNode.setProperty(
+ ArgeoNames.ARGEO_DATA_MODEL_VERSION,
+ dataModelMigration.getTargetVersion());
+ session.save();
+ }
+ } catch (Exception e) {
+ log.error("Cannot set model version", e);
+ }
+ }
+ JcrUtils.logoutQuietly(session);
+
+ }
+
+ /** Lazy init. */
+ protected File getHomeDirectory() {
+ return homeDirectory;
+ // if (home != null)
+ // return home;
+ //
+ // try {
+ // String osgiData = System.getProperty("osgi.instance.area");
+ // if (osgiData != null)
+ // osgiData = osgiData.substring("file:".length());
+ // String path;
+ // if (homeDirectory == null)
+ // path = "./jackrabbit";
+ // else
+ // path = homeDirectory;
+ // if (path.startsWith(".") && osgiData != null) {
+ // home = new File(osgiData + '/' + path).getCanonicalFile();
+ // } else
+ // home = new File(path).getCanonicalFile();
+ // return home;
+ // } catch (Exception e) {
+ // throw new ArgeoException("Cannot define Jackrabbit home based on "
+ // + homeDirectory, e);
+ // }