Uploaded image for project: 'Hibernate ODM'
  1. Hibernate ODM
  2. HIBERNATE-36

Support per Session configuration of read and write concern

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • 5
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Support MongoDB's read/write concerns by the following approach:

      1. injected Mongo-specific `MongoSessionFactory` which is a wrapper of existing Hibernate's default `SessionFactory` with additional read/write concerns config
      2. Injected Mongo-specific `MongoSession` which is a wrapper of existing Hibernate's default `Session` with additional read/write concerns config
      3. add overloaded methods for both `MongoSessionFactory` and `MongoSession` to provide explicit read/write concern config when creating `Session` (from `MongoSessionFactory`) or `Transaction` (from `MongoSession`), which will overwrite the default config of the initiator (`MongoSessionFactory` and `MongoSession`)
      4. use `ThreadLocalCurrentSessionContext` to bind the newly-created `MongoSession` to the context
      5. getting the `TransactionOptions` stored in the `current session` above from `MongoConnection` when a new transaction is to be created.

            Assignee:
            Unassigned Unassigned
            Reporter:
            nathan.xu@mongodb.com Nathan Xu
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: