ConcurrentModificationException usually has nothing to do with multiple threads. Most of the time it occurs because you are modifying the collection over which it is iterating within the body of the iteration loop. For example, this will cause it:

Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
    Item item = (Item) iterator.next();
    if (item.satisfiesCondition()) {
In this case you must use the iterator.remove() method instead. This occurs equally if you are adding to the collection, in which case there is no general solution. However, the subclass ListIterator can be used if dealing with a list and this has an add() method.


Hot Deployment in JBoss

compile war:war
(or package war:war, which is slower)

The fastest way to delete a large folder in Windows

rmdir /s /q folder