1 2 Previous Next 24 Replies Latest reply on Feb 20, 2012 1:34 PM by douglas.ferguson Go to original post
      • 15. Re: cluster-wide sync errors
        sannegrinovero

        You don't need XA, just JTA would be enough: you would still have only one resource when using synchronization. Even wanting to enlisten Infinispan as a resource, it's XA compatible and any decent TransactionManager should be able to deal with a single non-XA resource (in addition to other XA), which could be your datasource in this case.

         

        You might get the JGroups incompatibility appear to work hacking on the configuration file, still the API changed and I wouldn't assume you won't hit method not found / class not found issues at some point.

        • 16. Re: cluster-wide sync errors
          douglas.ferguson

          I think I must have lead you astray at some point.

           

          Ininispan 5.1.1 is using JGroups 3. I was previously using an older Infinispan so my config string were JGroups 2 based.

          That's what is breaking.

           

          To get past the ehcache road block, I patched the ehcache code with the JGroups 3 api changes.

          Only one I didn't see a direct match for was the Channel.LOCAL.

           

          As for the JTA, do you have any recomendations on a manager to try out with Spring/Infinispan/Hibnerate/Tomcat?

           

          Douglas

          • 17. Re: cluster-wide sync errors
            dan.berindei

            Douglas, why not use the JGroups configuration bundled with Infinispan?

             

            STREAMING_STATE_TRANSFER is no longer required by Infinispan since 5.1, and you can just remove the NAKACK.gc_lag attribute.

            • 18. Re: cluster-wide sync errors
              douglas.ferguson

              We were previously using jGroups for ehcache, Spring session registry, and hibernate search.

               

              We had to overide the config so that we could have control over the channel names and we had problems with UDP, so we configured it for TCP.

              When we tried out infinispan we left our JGroups config the same.

               

              I think JGroups is happy for the most part right now. I finally found the 3.0 API change logs via the JGroups list.

               

              The thing that I'm still stuck on is trying to get JTA to work without our JPA/Hibernate/Spring setup.

               

              Douglas

              • 19. Re: cluster-wide sync errors
                sannegrinovero

                This was contributed by another Spring user, I hope it's correct! It's one of the integration tests in the Hibernate Search codebase.

                While it integrates JTA+Spring+Hibernate you'll have to add Infinispan yourself.. hope it helps though!

                 

                https://github.com/hibernate/hibernate-search/tree/master/hibernate-search-integrationtest/src/test/java/org/hibernate/search/test/integration/jtaspring

                 

                I think I must have lead you astray at some point.

                 

                Ininispan 5.1.1 is using JGroups 3. I was previously using an older Infinispan so my config string were JGroups 2 based.

                That's what is breaking.

                 

                To get past the ehcache road block, I patched the ehcache code with the JGroups 3 api changes.

                Only one I didn't see a direct match for was the Channel.LOCAL.

                 

                Thanks, now I understood.

                • 20. Re: cluster-wide sync errors
                  douglas.ferguson
                  • 21. Re: cluster-wide sync errors
                    sannegrinovero

                    looks like it is where it should be:

                    https://github.com/hibernate/hibernate-search/tree/master/hibernate-search-integrationtest/src/test/resources

                     

                    Feel free to clone / checkout the project in it's entirety

                    • 22. Re: cluster-wide sync errors
                      douglas.ferguson

                      After digging into that config some more it seems that it requires XADatasource. It just so happens that the H2 driver is an XA datasource.

                       

                      D/

                      • 23. Re: cluster-wide sync errors
                        douglas.ferguson

                        Insteaead of using the bitronix.tm.resource.jdbc.PoolingDataSource I just used the datasources that we were previously using, everything seems to start up fine.

                         

                        I had to change our query cache annotations to type Transactional as ReadWrite was blowing up.

                         

                        Now we are getting the following exception, and I'm not having much luck finding the cause:

                         

                        STDOUT [DEBUG] [2012.02.20 16:46:13] infinispan.InfinispanRegionFactory - Building collection cache region [MyEntity]

                        STDOUT [DEBUG] [2012.02.20 16:46:13] infinispan.InfinispanRegionFactory - Configuration override via property hibernate.cache.infinispan.use_synchronization: null

                        STDOUT [WARN ] [2012.02.20 16:46:13] statetransfer.BaseStateTransferManagerImpl - ISPN000159: Unblocking transactions failed

                        java.lang.IllegalStateException: Trying to unblock write commands for cache view 1 but they were not blocked

                                  at org.infinispan.statetransfer.StateTransferLockImpl.unblockNewTransactions(StateTransferLockImpl.java:260)

                                  at org.infinispan.statetransfer.BaseStateTransferManagerImpl.postInstallView(BaseStateTransferManagerImpl.java:351)

                                  at org.infinispan.cacheviews.CacheViewsManagerImpl.handleCommitView(CacheViewsManagerImpl.java:520)

                                  at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterCommitView(CacheViewsManagerImpl.java:387)

                                  at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:271)

                                  at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:876)

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                                  at java.lang.Thread.run(Thread.java:680)

                        • 24. Re: cluster-wide sync errors
                          douglas.ferguson

                          I also tried it with XA and I got the same problem...

                          1 2 Previous Next