Sounds like I originally intended to use close but used stop instead.  If close 
isn't being used then it can be removed.

Sent from my iPad

On Apr 27, 2013, at 4:46 AM, Nick Williams <nicho...@nicholaswilliams.net> 
wrote:

> While working on database appenders, I figured that the best place to 
> "connect" is in Appender#start() and, likewise, the best place to 
> "disconnect" is in Appender#stop(). However, then I noticed that 
> AbstractAppender defines a close() method with the JavaDoc comment "Close the 
> stream associated with the Appender." This could be read "Close the database 
> connection associated with the Appender."
> 
> So, with that said, where should I close the connection? In stop() or in 
> close()? The AbstractOutputStreamAppender closes the stream in stop() (which 
> is what I originally expected) and never overrides close(). Since close() is 
> not part of the Appender or Lifecycle interface, will it ever even be called? 
> It's not called in the default start() implementation, and it's not 
> overridden in any implementations.
> 
> These two are a little confusing. I recommend either JavaDoc clarification 
> explaining the difference between the two, or simply removing close() (makes 
> more sense to me).
> 
> Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to