When u have a connection pool implemented then you basically leave the container to manages the connection. The open and close you have in your code will virtually have no effects on the connection. When the pool is initialized the specific number of connection you mention in the config file is created and kept for you. So when you say you are done with a connection the connection is not destryed instead it's put back to the pool. This is to improve performance and avoid connection establishing bottle necks
'Creating a DBMS connection is a slow operation. With connection pools, "__connections are already established__" and available to users. The alternative is for applications to make their own JDBC connections as needed. A DBMS runs faster with dedicated connections than if it has to handle incoming connection attempts at run time.'