commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33167] New: - Individual connection close method
Date Wed, 19 Jan 2005 19:50:12 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33167>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33167

           Summary: Individual connection close method
           Product: Commons
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: srinath5177@hotmail.com


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) {
    	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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message