This content has been marked as final.
Show 3 replies
-
1. Re: ConcurrentModification Exception when calling actionlistener
ilya_shaikovsky Dec 16, 2009 3:43 AM (in response to samvimes)post your bean code also please -
2. Re: ConcurrentModification Exception when calling actionlistener
samvimes Dec 16, 2009 4:46 AM (in response to ilya_shaikovsky)This is the called actionListener. Exception occurs while looping through the selected users with the iterator.
public void deleteUsers(ActionEvent e) { releaseLock(); resetDetails(); userErrorMessages.clear(); Mandator mandator = sessionContext.getMandator(); UserTableEntry user; String msg; for (Iterator<UserTableEntry> currentUserList = users.iterator(); currentUserList .hasNext();) { user = currentUserList.next(); if (user.isSelected()) { try { msg = userService.deleteUser(user, mandator); if (msg.equals("")) currentUserList.remove(); else userErrorMessages .add(buildUserErrorMessage(user, msg)); } catch (DataAccessException dae) { logger.error(dae.getMessage(), dae); ... } } } if (userErrorMessages.isEmpty()) { statusPopupRendered = true; } else { userResultPopupRendered = true; } }
-
3. Re: ConcurrentModification Exception when calling actionlistener
samvimes Dec 18, 2009 7:52 AM (in response to samvimes)As a workaround I will explicitly synchronize the method call but are there no further suggestions?