synchronizing the java function calls in DWR