5 Replies Latest reply on Jan 12, 2009 12:56 PM by jason.greene

    Version 3.0.0.GA Hibernate 2nd Level cache

    artisan

      I'm currently investigating the use of JBoss Cache Pojo 3.0.0 as a second level cache implementation for Hibernate. I thought this implementation tobe the most appropriate as I need clustering, transactions and circular- and shared relationships in object graphs.

      Is it currently possible to use the 3.0.0 release in Hibernate ? Or is it better to use a different release ?

      Can someone point me to an example configuration ? Many thanks !

      Jan

        • 1. Re: Version 3.0.0.GA Hibernate 2nd Level cache
          manik

          yes it is possible, JBoss AS 5 uses JBC 3.0.1 with Hibernate for its JPA implementation. For an example of the configuration used, have a look at the JBoss AS 5 distribution.

          • 2. Re: Version 3.0.0.GA Hibernate 2nd Level cache
            artisan

            Any chance to make it work on JBoss 4.x too ? I'm afraid in my case it's not yet an option to upgrade the application server.

            Thanks !

            • 3. Re: Version 3.0.0.GA Hibernate 2nd Level cache
              manik

              Depends - how are you using Hibernate?

              1) Indirectly, by using EJB3 entities in JBoss AS 4.x?
              2) Directly, by packaging Hibernate jars in your WAR or EAR?

              If the answer is (1) then there is nothing you can do, I'm afraid. If it is (2), then you can package JBC jars with your app as well and you can use it with Hibernate. You can refer to the JBoss AS 5 config files as an example.

              • 4. Re: Version 3.0.0.GA Hibernate 2nd Level cache
                artisan

                Sorry for the late reply, but I was off the project for some time...

                We apparently put the whole lot of jars into the application. So the options are open.

                I've had a brief trial with ehcache to make its cache distributed as this is the current cache provider of the application. The weird thing is that the cache works standalone but not when it is part of a deployed application.

                Error doing put to remote peer. Message was: Connection refused to host 127.0.0.1;...

                Is there an RMI setting of some kind I need to change to have ehcache work ? I've tested firewall ao and it all seems ok.

                • 5. Re: Version 3.0.0.GA Hibernate 2nd Level cache
                  jason.greene

                  Moving this to the core cache forums since it has nothing to do with pojo cache.

                  Also, if you have ehcache problems, ask the ehcache guys, these forums are for jboss cache related discussion.