code: public synchronized Object getInstance()
    {
  
      // Check if the pool is empty.
      if (freeStack.isEmpty())
      {
  
        // Create a new object if so.
        try
        {
          return objectType.newInstance();
        }
        catch (InstantiationException ex){}
        catch (IllegalAccessException ex){}
  
        // Throw unchecked exception for error in pool configuration.
        throw new RuntimeException(XMLMessages.createXMLMessage(XMLErrorResources.ER_EXCEPTION_CREATING_POOL, null)); //"exception creating new instance for pool");
      }
      else
      {
  
        // Remove object from end of free pool.
        Object result = freeStack.remove(freeStack.size() - 1);
  
        return result;
      }
    }
docs: Get an instance of the given object in this pool
  
  
  @return An instance of the given object