Announcement Announcement Module
No announcement yet.
Roo1.2M1: @Transactional and Mongo Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo1.2M1: @Transactional and Mongo

    Can someone clarify that there is "no magic" when using @Transactional and a mongo repository as described in this recent post:

    What I mean by "no magic", is that non-JTA DBs do not join transactions and participate in rollback etc.
    If this is the case it might be good to highlight this limitation in the docs?

    Is my understanding correct that the closest we can get to @Transactional support when using Spring-Data-MongoDB is via its "cross store" feature and that keeping your mongo store consistent is still an application-level responsibility?

    Thanks in advance!
    Steven Marcus

  • #2
    The MongoDB repositories should not take part in transactions started in any layers above it. As you noted MongoDB and most other NoSQL stores I am aware of don't offer transaction support

    The cross store feature is intended to allow you to persist some entity properties via JPA whereas fields annotated with @RelatedDocument are persisted in MongoDB.


    • #3

      So how can we manage [in a good way rollback in mongodb manually]?