Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-61

[dbcp] Individual connection close method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.3
    • None
    • Operating System: Windows XP
      Platform: PC

    • 33167

    Description

      The PerUserPoolDataSource object has a close method which closes all the
      connection that is being maintained by the pool. I have a need where the users
      can change their passwords, which requires closing the existing connection and
      opening a new one. I have a close method which takes a user as a parameter
      which will close all the connections for the specified user name.
      I have pasted the code here.

      /**

      • Close pool for particular user
      • */
        public void close(String user)

        Unknown macro: { try { PoolKey key = getPoolKey(user); ObjectPool pool = (ObjectPool) pools.get(key); pool.close(); } catch (Exception closePoolException) { closePoolException.printStackTrace(); } }

      My questions are are is this is a right way to approach or should there a
      change password method which should do that ? If the above code can be added
      to the main stream ( if it is good, it will be great).
      Thanks.

      Attachments

        Activity

          People

            markt Mark Thomas
            srinath5177@hotmail.com Srinath Narasimhan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: