What is a database connection? This is a session with your database and as such:
- Session state of client and server sides
- There is a transaction associated with this session.
Now, since your client application is multithreaded, I suspect that there are only a very limited number of cases where your setup makes sense, namely:
- You are not using session state, even inadvertently (and this may be provider specific)
- You do not use transactions and always automatically execute
- Even with automatic fixation, there may be race conditions, so you make sure that this does not happen.
- , , .
/ , , , , . (, ..), . , ( ), - . , ?
:
, ?
(. ), .
-, ?
, . JDBC , - .
script script, script, Swing .. .
- close() , - , call() ResultSet / Statement?
close() , DataSource.getConnection() (, DataSource).
close() , .