code: private Connection getConnection(PooledConnection pconn, WSConnectionRequestInfoImpl cri, String userName) throws ResourceException
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(this, tc, "getConnection", AdapterUtil.toString(pconn));
  
          Connection conn = null;
          boolean isConnectionSetupComplete = false;
          try {
              conn = pconn.getConnection();
              postGetConnectionHandling(conn);
              isConnectionSetupComplete = true;
          } catch (SQLException se) {
              FFDCFilter.processException(se, getClass().getName(), "260", this);
              ResourceException x = AdapterUtil.translateSQLException(se, this, false, getClass());
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(this, tc, "getConnection", se);
              throw x;
          } finally {
              // Destroy the connection if we weren't able to successfully complete the setup.
              if (!isConnectionSetupComplete) {
                  if (conn != null)
                      try {
                          conn.close();
                      } catch (Throwable x) {
                      }
                  if (pconn != null)
                      try {
                          pconn.close();
                      } catch (Throwable x) {
                      }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(this, tc, "getConnection", AdapterUtil.toString(conn));
          return conn;
      }
docs: Gets a java.sql.Connection from a PooledConnection, use the cri to extract certain information
  if needed, if trused context is supported, ...
  
  @param PooledConnection pconn - the PooledConnection
  @param WSConnectionRequestInfoImpl -- the cri
  @param userName the user name for the connection, or NULL if unspecified.
  @return java.sql.Connection - Connection to the database
  @exception ResouceException - Possible causes for this error are:
  1) the database threw an SQLException on PooledConnection.getConnection();
  2) there was an SQLException when setting a default property on the Connection