Project

General

Profile

bug #6780

ConversationHolder isTransactionActive() returns true even if the transaction is completed

Added by Andreas Kohlbecker over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
07/07/2017
Due date:
% Done:

50%

Severity:
normal
Found in Version:

Description

The ConversationHolder method isTransactionActive() (always?) returns true in cases when the transaction has been rolled back or was committed.

this mehtod should be changed like this:


public boolean isTransactionActive(){
        return transactionStatus != null && !transactionStatus.isCompleted();
    }

#4335 is possibly a duplicate of this

Associated revisions

Revision 6c1d8f53 (diff)
Added by Andreas Kohlbecker about 1 year ago

fix #6780 correctly checking for active transaction

Revision ec18134a (diff)
Added by Andreas Kohlbecker about 1 year ago

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

Revision b84bb2fd (diff)
Added by Andreas Kohlbecker about 1 year 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.

History

#2 Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from New to In Progress
  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • Target version changed from Unassigned CDM tickets to Release 4.11

#3 Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 50

#4 Updated by Andreas Kohlbecker about 1 year ago

I needed to revert (cdm-vaadin|b84bb2fd ) a prevous commit which was making use of the fixed isTransactionActive() method due to problems with the transaction synchronization being not active:

2017-10-25 18:03:20.859:WARN:oejs.HttpChannel:qtp748658608-47: /app/distribution
java.lang.IllegalStateException: Cannot deactivate transaction synchronization - not active
    at org.springframework.transaction.support.TransactionSynchronizationManager.clearSynchronization(TransactionSynchronizationManager.java:329)
    at org.springframework.transaction.support.TransactionSynchronizationManager.clear(TransactionSynchronizationManager.java:464)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1013)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:811)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
    at eu.etaxonomy.cdm.api.conversation.ConversationHolder.commit(ConversationHolder.java:341)
    at eu.etaxonomy.vaadin.mvp.AbstractPresenter.unbindConversation(AbstractPresenter.java:194)
    at eu.etaxonomy.vaadin.mvp.AbstractPresenter.onRequestEnd(AbstractPresenter.java:253)
    at eu.etaxonomy.cdm.vaadin.server.CdmSpringVaadinServletService.lambda$1(CdmSpringVaadinServletService.java:56)
    at java.util.ArrayList.forEach(ArrayList.java:1249)
    at eu.etaxonomy.cdm.vaadin.server.CdmSpringVaadinServletService.requestEnd(CdmSpringVaadinServletService.java:56)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1450)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:380)

#5 Updated by Andreas Kohlbecker about 1 year ago

  • Target version changed from Release 4.11 to Release 4.12

#6 Updated by Andreas Müller about 1 year ago

  • Status changed from Resolved to Feedback

#7 Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from Feedback to Closed

reviewed by a.mueller: "Deine vorgeschlagenen Änderungen im ConversationHolder sind dort ja weiterhin drin. Lediglich in vaadin hast du wohl etwas reverted.
Kann man das Ticket evtl. doch schließen jetzt? "

Ok, dann ist also alles gut und du hast hiermit auch gleich das Review gemacht, also schließe ich das Ticket.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)