I open a connection via a connection pool, then create a statement on that connection.
When I close the connection, is the statement closed automatically?
Maybe it's obvious but I really need to make sure.
Particularly in the case of a connection pool, because close() doesn't really close the connection (if my pool understanding is correct).
Designer and developer on Faëria: Strategy Card Game (www.faeria.net). The server is 100% Java.
@Jiem_ on Twitter (http://twitter.com/Jiem_)
Properly implemented connection pool should close the statements and resultsets when you return the connection to the pool. Otherwise another request could obtain a connection which has statements/resultsets open, and that certainly isn't desired.
A poorly implemented connection pool might neglect some of these finesses, but I'd expect all mainstream connection pools to be much more robust. Most importantly - it should be fairly easy to test with the connection pool you're using.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads