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 19615] New: - Unecessary global synchronized in AbandonedObjectPool methods
Date Fri, 02 May 2003 21:12:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19615>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19615

Unecessary global synchronized in AbandonedObjectPool methods

           Summary: Unecessary global synchronized in AbandonedObjectPool
                    methods
           Product: Commons
           Version: 2.1 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: George.Lindholm@ubc.ca


Rather than having "public synchronized void returnObject()/borrowObject()"
wouldn't this be better if RemoveAbandoned is false:

    public void returnObject(Object obj) throws Exception {
      long startTime = System.currentTimeMillis();
        if (config != null && config.getRemoveAbandoned()) {
            synchronized(this) {
              trace.remove(obj);
            }
        }
        super.returnObject(obj);
    }

   George

---------------------------------------------------------------------
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