On 16/12/11 19:16, Nadav Hoze wrote:
Sorry for the delay - a slight matter of getting the 1st Apache Jena
release sorted out.
Hi,
thanks for the answer Andy.
couple of things I'd like to verify with you:
1. From you answer I understand this exception does not state that the database
is inconsistent or corrupted, correct ?
It is likely to be corrupt.
2. Regarding what you said "The dataset is the unit at the storage layer so it
gets messy if you
have many named models.",I have only one named model so is it OK to use the
close and create at the model level, and not the dataset ?
In 0.8.5, it may not be reliable. It should work in later versions
(i.e. fixes and testing happened) but this is not the ideal way of working.
3. should I reverse the code:
TDB.closedown();
model.close();
Yes.
4. is there a way to prevent this from happening besides switching versions,
can you show me the proper template of :
a. how to open a model
b. Critical section with right lock
c. do CRUD operations (remove statements, add statements, etc...)
d. leave critical section.
e. close model.
There are a lot of fixes post 0.8.5 that updating is a very good idea.
The database layout is the same.
5. If I switch to version
the open and close model is for HA purpose, we have 2 servers (i.e. 2 jvms)
that approach the DB and our current solution is to open connection from
scratch and close it.
I don't follow that.
The rule is one JVM-one database set of files. TDB is the database
server (running embedded in yoru app). You would not run two MySQL
instances with the same database files (it does not let you anyway).
You would have to have two copies of the database files, in two locations.
Or use a server like Fuseki to front the database.
thanks,
Andy