Hi,
I am integrating SimpleDBM into our system. But I am facing some problems or limitations during the usage of the system.
The first problem is the system restarting problem. During a crash simulation testing, when I stopped the system without calling Server.shutdown() and then tried to restart it in a new session, I got StorageException saying that may be another instance of the server is running. The error description is below:
Cause: StorageException
Message: SIMPLEDBM-EV0005: Error starting SimpleDBM RSS Server, another instance may be running - error was: SIMPLEDBM-ES0017: Unable to create StorageContainer C:\eclipse\runtime-workbench-workspace\.metadata\.plugins\FileSystem\ProjectStoreDbs\_internal\lock because an object of the name already exists
Below is how I am starting an instance of the server:
if (serverStarted) {
throw new RuntimeException("Server is already started"); //$NON-NLS-1$
}
server = new Server(getServerProperties());
server.start();
serverStarted = true;
getServerProperties() returns the same properties as those used when the server is created.
I noticed that I am using transactions for all my operation on data and indexes. Thus I believe that transactions committing will release all locks.
When I manually delete the lock file from _internal folder, everything is ok. I don’t know if it a good practice to do so.
If somebody knows how to properly restart the server without loosing already saved data and without manually deleting the lock file, that will be very helpful.
The second issue is not really a problem, but one of the system limitations. Right now, once tables and indexes are created they can’t be deleted. So until now what I am doing is delete the table and index files directly from the file system and avoid to reuse the identifiers used for the table and index that have been already registered in the server.
If there is some good way to come over the table and index deletion, that will also be very helpful.
Cheers.
Aboubacar.