castor
  1. castor
  2. CASTOR-1179

Refactor how transaction managers are maintained

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.9.9 M1
    • Component/s: JDO
    • Labels:
      None
    • Number of attachments :
      3

      Description

      Relevant description copied from CASTOR-1173

      Ralf:
      ATM we only have one global transaction manager which is ok for 1 jdo-conf, but if we load 2 different jdo-conf's they can have different definitions for transaction managers. IMO we will need to assign a ConnectionFactory with the transaction manager that will handle its transactions.

      Werner:
      I agree with Ralf that we need to re-assess some of the old assumptions in the light of multiple JDO configurations. This, imho, should be done in a separate Jira issue to be created.

      Werner:
      Actually, we should even reconsider whether the 1:m relation between transaction mode and databases instances is justified.

      1. patch-C1179-20050810.txt
        134 kB
        Ralf Joachim
      2. patch-C1179-20050815.txt
        142 kB
        Ralf Joachim
      3. patch-C1179-20050816.txt
        145 kB
        Ralf Joachim

        Issue Links

          Activity

          Hide
          Werner Guttmann added a comment -

          In TransactionManagerFactoryRegistry.load(), the comment seems to be in conflict with the fact that the load() method is still declared synchronized.

          Show
          Werner Guttmann added a comment - In TransactionManagerFactoryRegistry.load(), the comment seems to be in conflict with the fact that the load() method is still declared synchronized.
          Hide
          Werner Guttmann added a comment -

          I wonder whether LocalTransactionManagerFactory should actually be changed to return a Null Object rather than null ...

          Show
          Werner Guttmann added a comment - I wonder whether LocalTransactionManagerFactory should actually be changed to return a Null Object rather than null ...
          Hide
          Ralf Joachim added a comment -

          Updated patch. Now throws exception if fails to get a transaction in J2EE mode. Also removed synchronization where not required and did some code cleanup in transactionmanager package.

          I tend to commit this and move additional refactoring at JDOManager and ConectionFactory to a new issue and not to back out CASTOR-1173.

          Show
          Ralf Joachim added a comment - Updated patch. Now throws exception if fails to get a transaction in J2EE mode. Also removed synchronization where not required and did some code cleanup in transactionmanager package. I tend to commit this and move additional refactoring at JDOManager and ConectionFactory to a new issue and not to back out CASTOR-1173 .
          Hide
          Ralf Joachim added a comment -

          Updated patch introducing a LocalTransactionManager returned by LoaclTransactionManagerFactory to replace null checks for better readability of the code in JDOManager.getDatabase().

          Show
          Ralf Joachim added a comment - Updated patch introducing a LocalTransactionManager returned by LoaclTransactionManagerFactory to replace null checks for better readability of the code in JDOManager.getDatabase().
          Hide
          Werner Guttmann added a comment -

          +1.

          Show
          Werner Guttmann added a comment - +1.

            People

            • Assignee:
              Ralf Joachim
              Reporter:
              Ralf Joachim
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: