On 29/10/11 15:06, Laurent Pellegrino wrote:
Hi all,
I have several questions about how to use the new transaction features
provided with the last version of TDB:
* Do we have to use the commit operation with a read transaction? Is
it compulsory (e.g. to release a lock), optional, or an error?
If you are using transaction at all, then you must use a read tranaction
(it can end with commit, abort or close - it'll make no difference for
read).
Locking is not needed except that each transaction must be single
threaded (basically, multiple-reader OR single-writer applies within a
transaction but only one thread per transaction is tested; no guarantees
multiple threads per transaction will everr be supported ; they just
"should" work at the moment).
* It seems that operations on DatasetGraphTxn do not throw checked
exceptions. However, do these operations can throw an unchecked
exception?
Yes.
But any exception is a sign of internal problems (or breaching concurrency).
No normal operation should throw an exception.
* Does nested read transactions are allowed?
No. No nested trasnactions at all. But if you are in a read
transaction you can make as many reads as you want.
* When a StoreConnection is created with Location.mem() as location,
what is created in memory (dataset+journal, only dataset or only
journal)?
Everything is (should) be in-memory.
It's for testing only.
* Does the information on the following webpages are up to date?
- http://openjena.org/wiki/TDB/Transactions
Should be.
- https://cwiki.apache.org/confluence/display/JENA/TxTDB-design
May be not.
That was the design and no design survives first contact with
implementation reality
Andy
Kind Regards,
Laurent