Recently we faced high CPU utilization by tomcat process running a GWTP and Spring based web-application. The thread dump shows several threads executing which stack-traces similar to following -
"http-443-2" daemon prio=10 tid=0x09d47000 nid=0x159e runnable [0x8cfd3000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.get(Unknown Source)
at com.gwtplatform.dispatch.server.spring.actionhandlervalidator.LazyActionHandlerValidatorRegistryImpl.findActionHandlerValidator(LazyActionHandlerValidatorRegistryImpl.java:68)
at com.gwtplatform.dispatch.server.AbstractDispatchImpl.findHandler(AbstractDispatchImpl.java:196)
at com.gwtplatform.dispatch.server.AbstractDispatchImpl.doExecute(AbstractDispatchImpl.java:147)
at com.gwtplatform.dispatch.server.AbstractDispatchImpl.execute(AbstractDispatchImpl.java:111)
at com.gwtplatform.dispatch.server.AbstractDispatchServiceImpl.execute(AbstractDispatchServiceImpl.java:81)
It seems that concurrent modifications to the maps used in this class may result in
corrupted indexes in hashmap. For immediate fix, how would we be able to override the ActionValidatorHandlerRegistry being used?