Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们是否需要在 dbcp.BasicDataSource 或 jndi 数据源(我正在使用 jboss)上调用任何方法以在完成后返回连接?
不,只是打电话Connection.close()。如果这个连接是从一个池化数据源获得的,那么它实际上不会被关闭,它只会被返回到池中。
Connection.close()