Not sure if this is the right place to post this thread…
Anyway-atm our server is using only one connection towards database…since we use nio, we only have one main server thread+one CleanupThread which does misc stuff like logging server heartbeat and cleaning users if their connections died(dial up disconnect etc).The latter gave us many troubles…
I dont want to get into thread pooling, i just want to share this 1 connection among those 2 threads.
Basicaly my question is this:do i get references to the same statement by calling connection.createStatement or do i get multiple statements-in documentation it says that it returns a new default Statement object…
Or is the approach with sharing connection bad?Dont have time to look/read a lot now :S…Opinions are very appreiciated.
Ty