tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Serializable Logging implementation
Date Wed, 15 Sep 2004 13:49:08 GMT
Yes

-Tim

Antony Paul wrote:

> My understanding is that this event will be called when the container
> passivates for transfering one object from one VM to Another like a cluster.
> Will this be invlked on Tomcat 4.1 when an object is serialised ?.
> 
> rgds
> Antony Paul
> 
> ----- Original Message -----
> From: "Tim Funk" <funkman@joedog.org>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, September 15, 2004 6:50 PM
> Subject: Re: Serializable Logging implementation
> 
> 
> 
>>Your NPE comes from the transient value not being restored from
> 
> de-serialization.
> 
>>Your best chance at this point without a lot of code changes is to
>>1) Make your log variable transient
>>2) Make your base class implement HttpSessionActivationListener.
>>3) Make your implementation of sessionDidActivate():
>>
>>public void sessionDidActivate(HttpSessionEvent se) {
>>   if (log==null)
>>     log = LogFactory.getLog(this.getClass());
>>}
>>
>>public void sessionWillPassivate (HttpSessionEvent se) {
>>   ; /* Nothing to do */
>>}
>>
>>
>>-Tim
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message