Results 1 to 2 of 2

Thread: spring transactions strategy for component integration

  1. #1

    Default spring transactions strategy for component integration

    We have a typical situation.

    Two java service components are being developed in parallel.

    Lets say A and B. A is JMS application that picks up message from queue and does some business rules processing. A uses B for database persistence. B does all database operations.

    So, that means B's methods are called from A always. A is developed using WebsphereUowTransactionManager (server specific subclass of JtaTransactionManager) while B is using JpaTransactionManager. A uses programmatic transaction model (yes, we need it) while B uses declarative model (@Transaction annotation). Both were developed using separate bean configurations.

    Now, in integration, we are facing transaction exceptions. I believe it is due to mis-match between transaction models of A and B. Theoritcally, B will use A's transactional context which is programatic. This makes B's declarative model redundant.

    So, the question is what should be the correct combined transaction strategy to integrate A and B?

    My understanding - A uses programmatic transactions so B also must use programmatic model.

  2. #2
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Default

    Been there, done that, and it's painful. Would you consider changing "A" to use a declarative transaction model?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •