Hi,
I am testing out a simple RPC call (as in the StockWatcher example).
I'm pulling some records from a database in the service now:
public class MyServiceImpl extends RemoteServiceServlet
implements IMyService
public Stuff[] getStuff(String criteria)
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/
test","username","password");
stmt = con.createStatement();
rs = stmt.executeQuery("SELECT * FROM blah");
while (rs.next()) {
...
}
}
return stuff;
}
It works fine, but I'm wondering about performance if I have several
thousand users calling this webservice simultaneously - would each
client be creating a brand new connection to my database when this RPC
function is called? If so, is that going to hold up for large volumes
of users? If not, can I somehow keep one db connection alive on my
server to pass around to new clients instead of constantly
reconnecting?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---