Project

General

Profile

« Previous | Next » 

Revision b84bb2fd

Added by Andreas Kohlbecker over 6 years ago

Revert "enabling transaction close on conversation unbind after ref #6780 is fixed this could also have en effect to ref #7035"

need to revert due to problems with transaction synchronization being not active

This reverts commit ec18134aae9b2699aebfcf378da03d767332dcb7.

View differences:

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;
12 13
import org.springframework.transaction.TransactionDefinition;
13 14
import org.springframework.transaction.support.DefaultTransactionDefinition;
14 15

  
......
189 190
    protected void unbindConversation() {
190 191
        logger.trace(String.format("<<<<< %s unbind()", _toString()));
191 192
        conversationHolder.unbind();
192
        if(conversationHolder.isTransactionActive()){
193
        // FIXME conversationHolder.isTransactionActive() always returns true
194
        // see https://dev.e-taxonomy.eu/redmine/issues/6780
195
        if(false && conversationHolder.isTransactionActive()){
193 196
            logger.trace(String.format("<<    %s comitting transaction ", _toString()));
194
            conversationHolder.commit(false);
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
            }
195 204
        }
196 205
        conversationBound = false;
197 206
    }

Also available in: Unified diff