I am developing a System and it has ArrayList that access in several places(inserting, removing and updates the values). Due to access of ArrayList in several places when i run the program it gives Concurrent update error.
Instead of ArrayList I can use Vector because Vector is synchronized. But if i use Vector will It be cause to decrease the performance of the system? Give me Ideas. How I can solve this issue?
This is part of the exception I get:
].[localhost].[/uckt].[Faces Servlet]] (http-127.0.0.1-8080-144)
Servlet.service() for servlet Faces Servlet threw exception: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) [:1.7.0_02]
at java.util.ArrayList$Itr.next(Unknown Source) [:1.7.0_02]