My problem is that i get a SQL error if the ajax component calls the servlet faster than it can handle. The error is: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.
Let�s say the number of letters to be entered is 3 before a servlet lookup is performed. If the user enters 3 letters ('pet') it works fine. But if the user enters 4 letters (too fast) the ajax component calls the servlet twice ('pet') and ('pete'), and an error occurs.
I can avoid the the above error by doing the servlet synchronized, but is that a good solution? Any other ways to solve the problem?
Actually it sounds as if your server components are poorly written. There should be no issues with conflicts between the separate queries. I'd check your server code to make sure you are following correct practices. [ January 02, 2009: Message edited by: Bear Bibeault ]