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 14983] - GenericObjectPool should allow for manual population of the pool
Date Fri, 14 Mar 2003 01:12:43 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=14983>.
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=14983

GenericObjectPool should allow for manual population of the pool





------- Additional Comments From ggregory@seagullsw.com  2003-03-14 01:12 -------
Returning the object from addObject() lets one write code like:

Session getSession() {
   //...
   if (makeSession) {
      return this.getPool().addObject(new Session());
   }
   //...
}

instead of:

Session getSession() {
   //...
   if (makeSession) {
      Session aSession = new Session();
      this.getPool().addObject(aSession);
      return aSession;
   }
   //...
}

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