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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top