Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4238

Missing module dependency: org.jboss.as.clustering.infinispan should depend on org.hibernate

    XMLWordPrintable

Details

    • Hide

      Use the following in hibernate.cfg.xml:

      
              <property name="hibernate.cache.use_second_level_cache">true</property>
              <property name="hibernate.cache.use_query_cache">true</property>
              <property name="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.JndiInfinispanRegionFactory</property>
              <property name="hibernate.cache.infinispan.cachemanager">java:jboss/infinispan/hibernate</property>
      
              <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
      
      
      Show
      Use the following in hibernate.cfg.xml: <property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.cache.use_query_cache">true</property> <property name="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.JndiInfinispanRegionFactory</property> <property name="hibernate.cache.infinispan.cachemanager">java:jboss/infinispan/hibernate</property> <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
    • Hide

      Add the following dependency (see >>> below, note services="import"):

      -----------------------------------------------------------------

      
      C:\jboss-as-7.1.1.Final\modules\org\jboss\as\clustering\infinispan\main\module.xml 
      
          <dependencies>
              <module name="javax.api"/>
              <module name="javax.transaction.api"/>
              <module name="net.jcip"/>
      
      >>>>>>>>>>>>>>>>>>   <module name="org.hibernate" services="import"/>
      
              <module name="org.infinispan"/>
              <module name="org.infinispan.cachestore.jdbc"/>
      
      
      Show
      Add the following dependency (see >>> below, note services="import"): ----------------------------------------------------------------- C:\jboss-as-7.1.1.Final\modules\org\jboss\as\clustering\infinispan\main\module.xml <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="net.jcip"/> >>>>>>>>>>>>>>>>>> <module name="org.hibernate" services="import"/> <module name="org.infinispan"/> <module name="org.infinispan.cachestore.jdbc"/>
    • Low

    Description

      I tried to port our .war application to JBoss 7.1.1 Final and tried to use Infinispan as the Hibernate second-level cache (via hibernate.cfg.xml configuration). Finally, I found it did not work, as the following dependency is missing that I added manually (see >>> below, especially note services="import"):

      -------------------------------------------------------------------------------

      C:\jboss-as-7.1.1.Final\modules\org\jboss\as\clustering\infinispan\main\module.xml 
      
          <dependencies>
              <module name="javax.api"/>
              <module name="javax.transaction.api"/>
              <module name="net.jcip"/>
      
      >>>>>>>>>>>>>>>>>>   <module name="org.hibernate" services="import"/>
      
              <module name="org.infinispan"/>
              <module name="org.infinispan.cachestore.jdbc"/>
      
      

      -------------------------------------------------------------------------------

      The reason is that org.hibernate module has services (hibernate-infinispan-4.0.1.Final.jar/META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions) to be loaded by Infinispan, thus needs to be loaded BEFORE Infinispan starts.

      NOTE: I have not completed our port yet as found other problems after that, but pretty sure this dependency should be inplace.

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              vsapounov_jira Vitaliy Sapounov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: