oSess.commit();
String sMountBase = "/usr/local/apache-tomcat-6.0.36/webapps/zesped/WEB-INF/volumes/"; // DAO.getVolumesMountBase();
if (sMountBase.length()>0) {
boolean bDefaultVolumeExists = false;
VolumeManager oVolm = oDms.getVolumeManager();
for (Volume v : oVolm.getVolumeList()) {
bDefaultVolumeExists = v.name().equals("Default");
if (bDefaultVolumeExists) break;
}
if (!bDefaultVolumeExists) {
sMountBase = Gadgets.chomp(sMountBase, File.separator);
FileSystem oFs = new FileSystem();
try {
oFs.mkdirs("file://"+sMountBase+"default");
} catch (Exception e) {
throw new FileNotFoundException("Could not create directory "+sMountBase+"default");
}
if (!new File(sMountBase).exists()) throw new FileNotFoundException("Could not create directory "+sMountBase+"default");
Volume oVol = oVolm.createVolume("Default", sMountBase, "default", 20*1048576);
oVol.setTotalSpace(100*1048576);
oVol.setDescription("Default Zesped Volume");
oVol.setMounted(true);
oVol.setUsable(true);
oVol.setMaxDirectories(1000);