// setup database connection informations.
try {
ConnectionPool pool = ConnectionPool.getInstance("vfssector");
} catch (ConnectionPoolException e) {
throw new SectorException(e.getMessage());
}
try {
// setup database scheme.
Schema.setup();
} catch (DBException e) {
throw new SectorException(
"Database error occurred. " + e.getMessage(), e);
}
// setup etc.
Config config = Config.getInstance();
try {
_availableBytes = Long.parseLong(
config.getProperty(_PROP_AVAILABLEBYTES));
} catch (NumberFormatException e) {
throw new SectorException(
"Invalid property " + _PROP_AVAILABLEBYTES + "]. " +
e.getMessage(), e);
}
clearUsedBytes();
_initialized = true;