문제

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