1 Reply Latest reply on Aug 29, 2014 9:33 AM by Vítor Corrêa

    how to set transaction isolation level for jboss 7.1.1?

    Kurt Xu Newbie

      Hello all:

        I got below error when running jboss 7.1.1 bundled with liferay portal 6.1.1.

       

      02:00:50,586 WARN  [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (liferay/scheduler_dispatch-634) Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@68e54de: java.sql.SQLException: pingDatabase failed status=-2

       

      At the meantime, the cpu utilization rate is very high , often go up to 99%, don't know why.

       

        I saw the thread pingDatabase failed statu s=-2 and tried to set transaction isolation level to REPEATABLE_READ ,  but my jboss  couldn't be started.

       

      Below is the standalone.xml I edited:

       

      <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
                  <cache-container name="hibernate" default-cache="local-query">
                      <local-cache name="entity">
                          <transaction mode="NON_XA"/>
                          <eviction strategy="LRU" max-entries="10000"/>
                          <locking isolation-level="REPEATABLE_READ"/>
                          <expiration max-idle="100000"/>
                      </local-cache>
                      <local-cache name="local-query">
                          <transaction mode="NONE"/>
                          <eviction strategy="LRU" max-entries="10000"/>
                          <locking isolation-level="REPEATABLE_READ"/>
                          <expiration max-idle="100000"/>
                      </local-cache>
                      <local-cache name="timestamps">
                          <transaction mode="NONE"/>
                          <eviction strategy="NONE"/>
                          <locking isolation-level="REPEATABLE_READ"/>
                      </local-cache>
                  </cache-container>
              </subsystem>
      
      

       

      Is there anything wrong?

       

      Thanks.

      Kurt

        • 1. Re: how to set transaction isolation level for jboss 7.1.1?
          Vítor Corrêa Newbie

          Hi,

          02:00:50,586 WARN  [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (liferay/scheduler_dispatch-634) Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@68e54de: java.sql.SQLException: pingDatabase failed status=-2


          The message denotes that somehow jboss can't establish a connection with the database. This can be caused for many reasons, but there are a checklist that

          may help.

          1. Try to ping/telnet and sqlplus the database, with the ip/port list and the hostname.

          2. Check the CPU usage while the WARN messages are printed on log files.


          The setup of the isolation level has to be made on datasource subsystem. You have edited the infinispan subsystem that handles isolation of the cache not

          the database transaction isolation. The directive you should edit is <transaction-isolation>LEVEL<transaction-isolation>


          Where LEVEL is one of these:

           

            TRANSACTION_READ_UNCOMMITTED

            TRANSACTION_READ_COMMITTED

            TRANSACTION_REPEATABLE_READ

            TRANSACTION_SERIALIZABLE

           

           

          Hope it helps