I have written a multi threaded Java program which works just fine. However the data that it prints to the console every second, I want saved to a mySQL database.
My issue is, I can't just use one database connection because it would just bottleneck with queued statements to be executed.
There are hundreds of threads being run at one so I need something like a multi threaded mySQL connection class.
I have briefly looked at DBCP but am not sure would it be suitable or how to implement it.
I would like to know how others have overcome this quite large issue.
Thanks
EDIT: Forgot to mention that this is a Java desktop app, not Java EE