Dear Jan,
You are right. In some way user#1 who makes the last update have the latest updateversion that user#2 (the user that did the first update) created. But, I really can't figure out the reason for this.
I have some trace below. How on earth does the second ActionForm get the new updateversion. I thought that action form objects are independent objects per user session. User#2 makes a reload after updating so that the new company is shown in its browser. But that reload should not affect the action form object of user#1, right?
Code:
User #1 reading
11:06:45,234 INFO [STDOUT] Hibernate: select company0_.ID as ID0_, company0_.updateVersion as updateVe2_1_0_, company0_.name as name1_0_, company0_.homePage as homePage1_0_ from company company0_ where company0_.ID=?
11:06:45,265 INFO [CompanyAction] TMPTMP ===============> read updateversion = 17
11:06:45,265 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 17
11:06:45,265 INFO [PropertyMessageResources] Initializing, config='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
11:06:45,281 INFO [HibernateFilter] TMPTMP ====================================> Before HibernateUtil.commitTransaction
11:06:45,281 INFO [HibernateFilter] TMPTMP ====================================> After HibernateUtil.commitTransaction
11:06:45,281 INFO [HibernateFilter] TMPTMP ====================================> About to close session
User #2 reading
11:06:52,390 INFO [STDOUT] Hibernate: select company0_.ID as ID0_, company0_.updateVersion as updateVe2_1_0_, company0_.name as name1_0_, company0_.homePage as homePage1_0_ from company company0_ where company0_.ID=?
11:06:52,406 INFO [CompanyAction] TMPTMP ===============> read updateversion = 17
11:06:52,406 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 17
11:06:52,406 INFO [PropertyMessageResources] Initializing, config='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
11:06:52,421 INFO [HibernateFilter] TMPTMP ====================================> Before HibernateUtil.commitTransaction
11:06:52,421 INFO [HibernateFilter] TMPTMP ====================================> After HibernateUtil.commitTransaction
11:06:52,421 INFO [HibernateFilter] TMPTMP ====================================> About to close session
User #2 updating
11:08:27,406 INFO [STDOUT] ======>>>>>>> CompanyActionForm.getUpdateVersion. updateVersion = 17
11:08:27,406 INFO [STDOUT] ======>>>>>>> CompanyActionForm.getUpdateVersion. updateVersion = 17
11:08:27,406 INFO [CompanyAction] ==========> update(): CompanyActionForm.updateVersion17
11:08:27,406 INFO [CompanyDAOImpl] TMPTMP ===============> about to update. updateversion = 17
11:08:27,406 INFO [STDOUT] Hibernate: update company set updateVersion=?, name=?, homePage=? where ID=? and updateVersion=?
11:08:27,499 INFO [STDOUT] Hibernate: select company0_.ID as ID, company0_.updateVersion as updateVe2_1_, company0_.name as name1_, company0_.homePage as homePage1_ from company company0_ order by company0_.name
11:08:27,546 INFO [CompanyAction] ===============> buildCompanySelect. company.getUpdateVersion() = 24
11:08:27,546 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 24
11:08:27,546 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 18
11:08:27,562 INFO [PropertyMessageResources] Initializing, config='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
11:08:27,562 INFO [HibernateFilter] TMPTMP ====================================> Before HibernateUtil.commitTransaction
11:08:27,562 INFO [HibernateFilter] TMPTMP ====================================> After HibernateUtil.commitTransaction
11:08:27,562 INFO [HibernateFilter] TMPTMP ====================================> About to close session
User #1 updating
11:10:35,062 INFO [STDOUT] ======>>>>>>> CompanyActionForm.getUpdateVersion. updateVersion = 18
11:10:35,062 INFO [STDOUT] ======>>>>>>> CompanyActionForm.getUpdateVersion. updateVersion = 18
11:10:35,062 INFO [CompanyAction] ==========> update(): CompanyActionForm.updateVersion18
11:10:35,062 INFO [CompanyDAOImpl] TMPTMP ===============> about to update. updateversion = 18
11:10:35,062 INFO [STDOUT] Hibernate: update company set updateVersion=?, name=?, homePage=? where ID=? and updateVersion=?
11:10:35,109 INFO [STDOUT] Hibernate: select company0_.ID as ID, company0_.updateVersion as updateVe2_1_, company0_.name as name1_, company0_.homePage as homePage1_ from company company0_ order by company0_.name
11:10:35,124 INFO [CompanyAction] ===============> buildCompanySelect. company.getUpdateVersion() = 24
11:10:35,124 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 24
11:10:35,140 INFO [STDOUT] ======>>>>>>> CompanyActionForm.setUpdateVersion. updateVersion = 19
11:10:35,140 INFO [PropertyMessageResources] Initializing, config='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
11:10:35,140 INFO [HibernateFilter] TMPTMP ====================================> Before HibernateUtil.commitTransaction
11:10:35,140 INFO [HibernateFilter] TMPTMP ====================================> After HibernateUtil.commitTransaction
11:10:35,140 INFO [HibernateFilter] TMPTMP ====================================> About to close session