Hi Andy,
thanks for the explanation, very clear and I think very useful.
Andy Seaborne wrote:
> With transactions, no clearup after .end() is needed. (and a writer
> doing .commit()/.abort() don't require .end - it's better style to
> always call .end() in a "finally{}2 though).
>
> When .commit() happens, the journal is written (append only), with a
> commit record. The changes are written to the main dataset at sometime
> when it's quiet. It may be when the .commit() happens, it may not -
> does not matter, the bytes are on-disk and the change is permanent.
One might still have the doubt if it is possible to call .begin(...)
on a Dataset after a successful READ|WRITE transaction:
Location location = ...
Dataset dataset = TDBFactory.createDataset(location);
dataset.begin(...);
try {
...
} finally {
dataset.end();
}
...
dataset.begin(...);
try {
...
} finally {
dataset.end();
}
I do not see any problem with that, but I wanted to double check.
Thanks,
Paolo