Question

Is it defined what should happen if begin() is called when there is already an active transaction? As I see it, there are four possibilities:

A. an exception is thrown

B. the begin() is silently ignored

C. some kind of transaction nesting takes place

D. it's undefined

Était-ce utile?

La solution

The answer is A, an exception is thrown. A Sesame RepositoryConnection only supports one active transaction at the same time - if concurrent transactions are needed, you need to work with multiple connections (a corrolary to this is that it's a bad idea to share a RepositoryConnection across threads).

I'll make sure the API Javadoc is updated to make this more clear.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top