Again, the same should be in the documentation. Is end() needed between the
two in this case? I understand that it is better style to use end() in any
case.

Bernie

On Wed, Apr 4, 2012 at 4:35 PM, Andy Seaborne <a...@apache.org> wrote:

> On 04/04/12 16:06, Paolo Castagna wrote:
>
>> 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.
>>
>
> Yes, the app can do that.
>
>        Andy
>

Reply via email to