Okay, I committed a pair of simple tests in commit() and abort() to see to it 
that you can’t call them outside a transaction and that made all of 
AbstractTestTransaction pass.

This worries me, because you suggested that it would probably require a 
finer-grained lifecycle modeled, and I didn’t do that, so I’m wondering what 
I’m missing. {grin} One remark of yours gives me pause, though: “I managed to 
add after commit.” That’s definitely intentional, because on your advice [*], I 
set up DatasetGraphInMemory so that a mutating operation outside of a 
transaction auto-wraps itself in a transaction. So calling add after commit is 
actually two legitimate transactions “under-the-hood".

Did I misinterpret what you advised? Did you mean me to add “auto-transact” in 
a more configurable way?

---
A. Soroka
The University of Virginia Library

[*] http://permalink.gmane.org/gmane.comp.apache.jena.devel/10529

> On Sep 24, 2015, at 1:05 PM, Andy Seaborne <[email protected]> wrote:
> 
> The rest are testing that e.g. begin-abort-commit is an error.  It looks like 
> the transaction lifecycle is not being tracked.  It needs finer granularity 
> than DatasetGraphInMemory.isInTransaction.  May be as simple as NOT_TXN -> 
> ACTIVE_TXN -> FINISHING_TXN (-> NOT_TXN). Just in/out isn't enough for, e.g. 
> begin-commit-add_quad->end , begin-commit-commit.  I managed to add after 
> commit.

Reply via email to