I wrote the following class DBManager to access the mySQL DB server from
java programs.
And use it in the following way:
Is there any problem in this approach?
Will the connection created in getQueryResultSet() closed automatically after I call this method?
There seems to be a limit on the number of available connections. As my program query the DB using the above approach continously, I am concerned whether the available connections would be exhausted. I started my program this afternoon and went out for a hour or so, when I came back, I found the following error message:
What could be the reason of this error?
To see whether it's the problem of connections, I wrote the following code to
test it,
And it didn't generate any error so far: the count is already 68000!
I am confused. Anybody can help me?
Thanks.
[ January 14, 2004: Message edited by: W Sun ]
[ January 14, 2004: Message edited by: W Sun ]