I am new to Pocketknife Querydsl(v: 5.0.0) framework. I would like to know how exactly Pocketknife Querydsl manages a transaction. Does it use the same transaction, If there is an already opened transaction or Does it create a new one? If it creates a new transaction every time even though there is an already open transaction, Then how to prevent it from creating new one? (I’m trying to implement Plugin for JIRA Server 7.x & 8.x).
com.atlassian.pocketknife.api.querydsl.DatabaseAccessor should expose ‘runInTransaction’ and ‘runInNewTransaction’ respectively. The ‘run’ method calls ‘runInTransaction’. I am using 5.0.3, I believe. I’m a beginner with QueryDSL like you though, so I may be incorrect.
<T> T runInNewTransaction(Function<DatabaseConnection, T> connection, OnRollback onRollback); <T> T runInTransaction(Function<DatabaseConnection, T> connection, OnRollback onRollback);