commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "movie user" <movieuser2...@gmail.com>
Subject Is invalidateObject() necessary is makeObject() throws exception
Date Tue, 13 Jan 2009 22:37:02 GMT
Hello Everyone,

I have a question on the common pool.

I have a makeObject() method inside the factory class. Now if this method
throws any exception do I need to do pool.invalidateObject() in the catch
block.

e.g

try {
   pool.borrowObject()l
}
 catch (Exception e) {
   pool.invalidateObject();
 }

Factory class

public Object makeObject() throws Exception {
  try {

  } catch (Exception e) {
     throw e;
    }
  return <some object>

}

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message