Skip to content

JDBC Message Store Needs @Transactional Annotations [INT-2568] #6547

Closed

Description

@spring-operator

Gary Russell opened INT-2568 and commented

JDBC Message Store manipulates 2 (3 in 2.2) tables. If it is invoked outside of a transaction there is a (small) chance of creating integrity problems.

Methods updating multiple tables should be annotated with @Transactional with REQUIRED propagation.

Work around is to start a transaction before invoking elements backed by a JDBC message store.


Affects: 2.1.1

Issue Links:

Activity

  1. spring-operator commented on May 18, 2012

    @spring-operator
    ContributorAuthor

    Artem Bilan commented

    The linked issue addresses similar solution with <transactional> sub-element.
    Also keep in mind: not all guys use <tx:annotation-driven/>.
    And it was a reason why <transactional> sub-element appeared in the JPA module.
    Maybe it will be enough if we'll say an assertError, if JdbcMessageStore operations aren't wrapped with transaction boundaries? At least that is what tells EntityManager, if Transaction isn't active...

  2. spring-operator commented on Aug 7, 2012

    @spring-operator
    ContributorAuthor

    Oleg Zhurakousky commented

    PR: #571

  3. spring-operator commented on Aug 8, 2012

    @spring-operator
    ContributorAuthor

    Oleg Zhurakousky commented

    Resolving it as "Won't Fix"
    Since user may need to inject its own TX manager the new request handling advice approach solves the issue in a configurable way:

    <int:aggregator . . . >
    	<int:request-handler-advice-chain>
    	     <int:ref bean="myTxAdvice"/>
    	</int:request-handler-advice-chain>
    </int:aggregator>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: jdbcstatus: declinedtype: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions