I want to make a gwt app with large number of concurrent users. Users will run many queries. Shouldn't I keep the connection open in this servlet so it can execute the queries faster like below? In the code below, for every user accessing this servlet does it create a new connection to the database or use one connection object in the servlet scope? Or should I use connection pooling?
import java.sql.*; public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService { private Connection connection; public GreetingServiceImpl(){ //Open the connection here } public String greetServer(String input) { //Use the connection here Statement stmt = connection.createStatement(); ..<do JDBC work>.. } } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---