Revision ec18134a
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPresenter.java | ||
---|---|---|
9 | 9 |
import org.springframework.beans.factory.annotation.Qualifier; |
10 | 10 |
import org.springframework.security.core.context.SecurityContext; |
11 | 11 |
import org.springframework.security.core.context.SecurityContextHolder; |
12 |
import org.springframework.transaction.IllegalTransactionStateException; |
|
13 | 12 |
import org.springframework.transaction.TransactionDefinition; |
14 | 13 |
import org.springframework.transaction.support.DefaultTransactionDefinition; |
15 | 14 |
|
... | ... | |
190 | 189 |
protected void unbindConversation() { |
191 | 190 |
logger.trace(String.format("<<<<< %s unbind()", _toString())); |
192 | 191 |
conversationHolder.unbind(); |
193 |
// FIXME conversationHolder.isTransactionActive() always returns true |
|
194 |
// see https://dev.e-taxonomy.eu/redmine/issues/6780 |
|
195 |
if(false && conversationHolder.isTransactionActive()){ |
|
192 |
if(conversationHolder.isTransactionActive()){ |
|
196 | 193 |
logger.trace(String.format("<< %s comitting transaction ", _toString())); |
197 |
try{ |
|
198 |
conversationHolder.commit(false); |
|
199 |
} catch (IllegalTransactionStateException | IllegalStateException e){ |
|
200 |
// log this exception, but stop from propagating |
|
201 |
// FIXME remove this catch once https://dev.e-taxonomy.eu/redmine/issues/6780 is fixed |
|
202 |
logger.error(e.getMessage()); |
|
203 |
} |
|
194 |
conversationHolder.commit(false); |
|
204 | 195 |
} |
205 | 196 |
conversationBound = false; |
206 | 197 |
} |
Also available in: Unified diff
enabling transaction close on conversation unbind after ref #6780 is fixed this could also have en effect to ref #7035