3 Replies Latest reply on Sep 11, 2012 10:24 AM by bsudhananthan

    Jboss 7 Cluster  org.jgroups.TimeoutException exception

    bsudhananthan

      Jboss 7.1.1 was started in cluster mode(standalone-full-ha.xml) with two nodes server1 and server2. I didn't make any changes in infinispan configuration in standalone-full-ha.xml, i used the one comes along with jboss 7.1.1.

       

      And i enabled second leve cache as below:

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

        <persistence-unit name="ejbPU" transaction-type="JTA">

          <jta-data-source>java:/DefaultDS</jta-data-source>

          <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>

          <properties>

              <property name="jboss.entity.manager.jndi.name" value="java:/ejbPU/EMSEM"/>

              <property name="jboss.entity.manager.factory.jndi.name" value="java:/ejbPU/EMSEMFactory"/>

              <property name="hibernate.id.new_generator_mappings" value="false" />

              <property name="hibernate.cache.use_second_level_cache" value="true"/>

          </properties>

        </persistence-unit>

      </persistence>

       

      When load splits up between server1 and server2 org.jgroups.TimeoutException occurs after few seconds when trying to synchronize the infinispan cache.

       

      I've attached the full trace of exception in this post. Please provide me solution to get rid of these issue.

       

      Thanks,

      Sudhananthan 

        • 1. Re: Jboss 7 Cluster  org.jgroups.TimeoutException exception
          ranga033

          Try upgrading to the latest hibernate version, it might work.

          • 2. Re: Jboss 7 Cluster  org.jgroups.TimeoutException exception
            bsudhananthan

            Thanks for your reply rang s,

             

            I've upgraded hibernate version from 4.0.1 to 4.1.4.  But Still i'm getting the same issue.

            • 3. Re: Jboss 7 Cluster  org.jgroups.TimeoutException exception
              bsudhananthan

              I found the cause for the issue.

              sudhananthan B wrote:

               

               

              And i enabled second leve cache as below:

              <?xml version="1.0" encoding="UTF-8"?>

              <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

                <persistence-unit name="ejbPU" transaction-type="JTA">

                  <jta-data-source>java:/DefaultDS</jta-data-source>

                  <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>

                  <properties>

                      <property name="jboss.entity.manager.jndi.name" value="java:/ejbPU/EMSEM"/>

                      <property name="jboss.entity.manager.factory.jndi.name" value="java:/ejbPU/EMSEMFactory"/>

                      <property name="hibernate.id.new_generator_mappings" value="false" />

                      <property name="hibernate.cache.use_second_level_cache" value="true"/>

                  </properties>

                </persistence-unit>

              </persistence>

               

               

              Sorry to not mentioning it in the post, I've also enabled querycache <property name="hibernate.cache.use_query_cache" value="true"/> .

               

              I created  sample EJB application with query cache enabled. In that case timeout sending message occurs. I removed the <property name="hibernate.cache.use_query_cache" value="true"/> from persistence.xml. Now the issue disappears.

               

              So the issue is with query caching. Please any one tell me is there any configuration i'm missing in standalone-full-ha.xml specific to query caching .

               

              Note :

              1. I didn't change any thing related to infinispan subsystem in standalone-full-ha.xml. And used the infinispan configuration as it comes along with 7.1.1.

              2. I attached the sample app to reproduce the issue.

                     Clust.jar - Is the jar to deploy under deployments folder.

                     Source.zip - contains the source files.

                     Steps to reproduce:

                            i. Deploy the Clust.jar in two nodes of cluster say server1 and server2.

                            ii. Run the com.MyDomain.ClientEntity concurrently some four or five times.