Announcement Announcement Module
Collapse
No announcement yet.
Commons transaction and Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Commons transaction and Spring

    Hi

    Have anyone used commons transaction with Spring? I got a service who writes to both database and filesystem, this must be done inside a transaction (XA). The service uses 2 DAO's, one for DB and another one for FS. The transaction is set set using spring xml config on the service layer (at the moment it only works for DB DAO). Has anyone done anything like this before me?

    Regards
    Bjørn Ove

  • #2
    You can simply configure a JTATransactionManager in Spring. Just make sure your datasource and filesystem access is XA enabled and you should be good to go.

    Search the forum because I'm sure it came up before.

    Comment


    • #3
      Hi mdeinum

      I have enabled XA in DB transactions using Spring and JOTM (running Tomcat). How do i configure commons transaction to use XA in Spring config, any idea/sample.

      Thanks in advance!

      Comment


      • #4
        The file system access in Commons Transaction is not yet XA enabled, but it's planned.

        Jörg

        Comment


        • #5
          you have to wait till its JTA enabled then........
          JTA transaction Manager works only with XA enabled resources

          Comment


          • #6
            Originally posted by Jörg Heinicke View Post
            The file system access in Commons Transaction is not yet XA enabled, but it's planned.
            I thought someone had all ready said they'd done this before. After reading this I remembered who it was .

            Comment


            • #7
              OK

              Thanks for replaying to my question guys. I have to make a "work-around" for my problem then..

              Regards
              Bjørn Ove

              Comment


              • #8
                Originally posted by karldmoore View Post
                I thought someone had all ready said they'd done this before. After reading this I remembered who it was .
                Bummer! Was it so obvious

                I might regret making this public ...

                I started implementing it on the weekend. Don't expect too much too fast. At least I'll have some testers out there

                Jörg

                Comment


                • #9
                  Originally posted by Jörg Heinicke View Post
                  Bummer! Was it so obvious

                  I might regret making this public ...

                  I started implementing it on the weekend. Don't expect too much too fast. At least I'll have some testers out there
                  , that's the trouble putting it in print. Once it's out there you can't take it back.

                  Comment


                  • #10
                    Hi,

                    Commons Transaction does not support XA transactions, afaik. You can use XADisk to perform the file operations inside the XA transaction. This same XA transaction can include other XA-enabled resources like database also.

                    Hope that helps.

                    Thanks,
                    Nitin

                    Comment

                    Working...
                    X