[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: timeout for simpleReadWriteEJBLock

_monkey_ do-not-reply at jboss.com
Thu Sep 21 21:40:03 EDT 2006


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"):

anonymous wrote : 
  | 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.

anonymous wrote : 
  | 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!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973441#3973441

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973441



More information about the jboss-user mailing list