You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Apache Wiki <wi...@apache.org> on 2007/08/20 08:50:37 UTC
[Commons Wiki] Update of "Logging/StaticLog" by JörgSchaible
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
The following page has been changed by JörgSchaible:
http://wiki.apache.org/jakarta-commons/Logging/StaticLog
The comment on the change is:
Add readResolve approach
------------------------------------------------------------------------------
Like static members, transient ones are not part of the serialized data so this should be
a serialization-compatible change.
+ Another approach is to implement the readResolve method that is automatically called at deserialization time if present:
+ {{{
+ private transient Log log = LogFactory.getLog(Some.class);
+ private Object readResolve() {
+ log = LogFactory.getLog(Some.class);
+ return this;
+ }
+ }}}
+ See javadoc of Serializable interface for further information.
+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org