updateStats periodically to Java from EE. Future work: let let java determine if we cancle the current query