This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi guys I need to save a counter that can be updated (quite frequently) from many different servlets, i cannot let the data it holds get lost in case tomcat is shut down, so the only two options i see for that are saving the counter in a database (MySQL) or in a text file.
My question is as far as you know, what is faster for opening and writing into, the database or the text file?