Hi Guys
Not sure whether this should be here or in the
tomcat forum. I'm sure someone will move it if it is in the wrong place.
My problem is that I am trying to import a large number of rows (10,000) into a MySql database. If I import say 1000 it seems to work ok. But with 10,000 I get connection errors (sorry, i'm at home and can't lay my hands on a stacktrace but it says something like "connect is already in use"). I'm using straight
jdbc - no fussing around with connection pooling or what have you at the moment.
I have a method getConnection which supplies all the connections, and it is synchronized, which I would have thought would solve this sort of problem.
My thought is that the jvm might be trying to be clever and open multiple threads to access the database simultaneously.
Any diagnostic thoughts? Any suggested solutions? Any better approaches that I could be using? Or should I be asking this in the Tomcat forum?