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>

}

Reply via email to