5 Replies Latest reply on Mar 15, 2007 7:49 AM by Thomas Rois

    timeout for simpleReadWriteEJBLock

    ft liou Newbie

      Hi everyone, I am a newbie in JBOSS, so any help or suggestion would be very much appreciated :)
      Previously I found that in my application, when there are 2 threads accessing the bean, deadlock occurs even they were both just trying to read, so I changed the default configuration from pessimistic lock to SimpleReadWriteEJBLock by the following configuration in jboss.xml:
      <container-configuration extends="Standard CMP 2.x EntityBean">
      <container-name>Standard CMP 2.x EntityBean</container-name> <locking-policy>org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock</locking-policy>
      </container-configuration>

      after making this change, and rerunning the application, instead of deadlock, I get the following transaction timeout error:

      13:54:06,906 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=andrewspc/108, BranchQual=, localId=108] timed out. status=STATUS_ACTIVE
      13:54:07,140 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=andrewspc/110, BranchQual=, localId=110] timed out. status=STATUS_ACTIVE
      13:54:07,203 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer com.patientrack.ejb.entityBean.AdmissionLocal.getAdmsnPK(), causedBy:
      javax.ejb.EJBException: Transaction marked for rollback - probably a timeout.
      at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.checkTransaction(SimpleReadWriteEJBLock.java:326)
      at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.waitAWhile(SimpleReadWriteEJBLock.java:205)
      at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.getWriteLock(SimpleReadWriteEJBLock.java:183)
      at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.schedule(SimpleReadWriteEJBLock.java:89)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:50)
      at $Proxy123.getAdmsnPK(Unknown Source)
      at com.patientrack.ejb.sessionBean.AdmissionManagerBean.convertAdmissionLocalToAdmission(AdmissionManagerBean.java:3463)
      at com.patientrack.ejb.sessionBean.AdmissionManagerBean.loadAdmissionForAdmsnPk(AdmissionManagerBean.java:1385)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at


      has anyone encountered this kind of problems before? Is there any configuration that I need to pay attention to? Help PLEASE...

      THANKS!

        • 1. Re: timeout for simpleReadWriteEJBLock
          Alberto Acinapura Newbie

          You should declare all getter methods as readonly in jboss.xml to get make it work.

          <entity>
           <ejb-name>BeanName</ejb-name>
           <method-attributes>
           <method>
           <method-name>get*</method-name>
           <read-only>true</read-only>
           </method>
           </method-attributes>
          </entity>
          

          Bye.


          • 2. Re: timeout for simpleReadWriteEJBLock
            ft liou Newbie

            Thank you so much for this!

            Now after this issue is resolved and no more transaction locking problems, I find that this seems slower than the original version(ie with the default pessimistic lock option), so I checked the server.log and find that right after the user login (up to creation of user_session inside database), apart from selecting the identified user, it also reloads all users from the database (please see the highlighted words "user account"):


            2006-09-22 09:49:50,531 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserAccount#findByUserID] Executing SQL: SELECT t0_o.USERR_PK FROM user_account t0_o WHERE (t0_o.USER_ID = ? AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,562 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,593 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,593 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,609 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserRight#findByUserrPK] Executing SQL: SELECT t0_o.USRRT_PK FROM user_right t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,609 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,609 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,625 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,640 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserGroup#findByUserrPK] Executing SQL: SELECT t0_o.USRGP_PK FROM user_group t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,640 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserGroup] Executing SQL: SELECT USERR_PK, RIGRP_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_group WHERE (USRGP_PK=?)
            2006-09-22 09:49:50,640 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupRight#findByRigrpRFVAL] Executing SQL: SELECT t0_o.GRPRI_PK FROM group_right t0_o WHERE (t0_o.RIGRP_RFVAL = (?))
            2006-09-22 09:49:50,656 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserAccount#findByUserID] Executing SQL: SELECT t0_o.USERR_PK FROM user_account t0_o WHERE (t0_o.USER_ID = ? AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,656 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,656 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,656 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,671 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,671 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,671 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,671 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,687 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,687 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,687 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,687 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,687 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 09:49:50,703 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserRight#findByUserrPK] Executing SQL: SELECT t0_o.USRRT_PK FROM user_right t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,703 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,703 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,703 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 09:49:50,718 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserGroup#findByUserrPK] Executing SQL: SELECT t0_o.USRGP_PK FROM user_group t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 09:49:50,718 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserGroup] Executing SQL: SELECT USERR_PK, RIGRP_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_group WHERE (USRGP_PK=?)
            2006-09-22 09:49:50,718 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupRight#findByRigrpRFVAL] Executing SQL: SELECT t0_o.GRPRI_PK FROM group_right t0_o WHERE (t0_o.RIGRP_RFVAL = (?))
            2006-09-22 09:49:50,734 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserSession#findActiveSessionsByUserrPK] Executing SQL: SELECT t0_o.USESN_PK FROM user_session t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.LOGOUT_DTTM IS NULL)
            2006-09-22 09:49:50,734 INFO [STDOUT] Entering UserSession.ejbCreate()
            2006-09-22 09:49:50,734 INFO [STDOUT] Leaving UserSession.ejbCreate()
            2006-09-22 09:49:50,734 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.UserSession] Executing SQL: INSERT INTO user_session (USERR_PK, SESSION_IDENTIFIER, LOGIN_DTTM, LOGOUT_DTTM, LOTYP_RFVAL, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)




            While in the original version, it seems that it is doing as expected, loading only the user by given id.


            2006-09-22 13:11:01,937 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserAccount#findByUserID] Executing SQL: SELECT t0_o.USERR_PK FROM user_account t0_o WHERE (t0_o.USER_ID = ? AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:01,968 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserAccount] Executing SQL: SELECT USER_ID, TITLE_RFVAL, SURNAME, FORENAME, INITIALS, USER_PASSWORD, SURNAME_UPPER, FORENAME_UPPER, DEFAULT_WARDD_RFVAL, NOTE, SYSTEM_USER_FLAG, ACTIVE_FLAG, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_account WHERE (USERR_PK=?)
            2006-09-22 13:11:01,968 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserRight#findByUserrPK] Executing SQL: SELECT t0_o.USRRT_PK FROM user_right t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:01,984 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserRight] Executing SQL: SELECT USRRT_PK, USERR_PK, RIGHT_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_right WHERE (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?) OR (USRRT_PK=?)
            2006-09-22 13:11:02,000 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserGroup#findByUserrPK] Executing SQL: SELECT t0_o.USRGP_PK FROM user_group t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:02,015 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserGroup] Executing SQL: SELECT USERR_PK, RIGRP_RFVAL, DELETED_FLAG, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM FROM user_group WHERE (USRGP_PK=?)
            2006-09-22 13:11:02,015 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupRight#findByRigrpRFVAL] Executing SQL: SELECT t0_o.GRPRI_PK FROM group_right t0_o WHERE (t0_o.RIGRP_RFVAL = (?))
            2006-09-22 13:11:02,015 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserAccount#findByUserID] Executing SQL: SELECT t0_o.USERR_PK FROM user_account t0_o WHERE (t0_o.USER_ID = ? AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:02,031 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserRight#findByUserrPK] Executing SQL: SELECT t0_o.USRRT_PK FROM user_right t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:02,031 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserGroup#findByUserrPK] Executing SQL: SELECT t0_o.USRGP_PK FROM user_group t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.DELETED_FLAG = 0)
            2006-09-22 13:11:02,031 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupRight#findByRigrpRFVAL] Executing SQL: SELECT t0_o.GRPRI_PK FROM group_right t0_o WHERE (t0_o.RIGRP_RFVAL = (?))
            2006-09-22 13:11:02,046 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserSession#findActiveSessionsByUserrPK] Executing SQL: SELECT t0_o.USESN_PK FROM user_session t0_o WHERE (t0_o.USERR_PK = (?) AND t0_o.LOGOUT_DTTM IS NULL)
            2006-09-22 13:11:02,046 INFO [STDOUT] Entering UserSession.ejbCreate()
            2006-09-22 13:11:02,046 INFO [STDOUT] Leaving UserSession.ejbCreate()
            2006-09-22 13:11:02,046 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.UserSession] Executing SQL: INSERT INTO user_session (USERR_PK, SESSION_IDENTIFIER, LOGIN_DTTM, LOGOUT_DTTM, LOTYP_RFVAL, CREATED_BY_USERR_PK, CREATED_DTTM, LAST_MODIFIED_BY_USERR_PK, LAST_MODIFIED_DTTM) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)



            I am not sure what is going on here, is it because I specified a simpleReadWriteEJBLock, so when I read data it is no longer treated as a "transaction" so it does not "own" the database anymore, and hence have to reload all user account data?? Can anyone enlighten me please...

            THANKS AGAIN!

            • 3. Re: timeout for simpleReadWriteEJBLock
              ft liou Newbie

              I had a look at mysql log, had to make correction to my last post:

              it also reloads all users from the database

              it didn't try to get all users from table, but instead loaded the same user 12 times!!! Any ideas?

              • 4. Re: timeout for simpleReadWriteEJBLock
                Gustavo Ambrozio Newbie

                I think I'm having the same problem... Any updates on this?

                • 5. Re: timeout for simpleReadWriteEJBLock
                  Thomas Rois Newbie

                  check the documentation-chapters on optimized loading and query behaviour,
                  there is also an additional document, called "jboss tuning" by adrian brock,
                  sadly i dont remember which url i acquired it from.