tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <>
Subject Re: Serializable Logging implementation
Date Fri, 17 Sep 2004 01:36:03 GMT
On Thu, Sep 16, 2004 at 07:49:17PM -0500, Spiegs wrote:
: What is the best approach for someone starting a new app? Is having all 
: of your model objects contain a transient static log instance, implement 
: Serializable, and implement HttpSessionActivationListener to 
: reinstantiate the log instance the best approach? What other approaches 
: would you recommend if you were to start with a clean slate?

What about, "don't store model objects[1] in session (or anyplace else
that may be serialized)?"  If you're passing data around, use a DTO.

Whether to use DTOs is something of a religious issue; but pure
data-holders rarely need internal logging.  If client code wants to log
a value they fetch out of a DTO, let them have at it...


[1] = This statement assumes any "model object" that requires internal
logging is much more than a pure data-holder.


software  --
tech news --

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message