tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject Re: HttpSessionActivationListener not getting called in the Tomcat 5.5.20 clustered mode.
Date Wed, 12 Dec 2007 18:42:32 GMT
The HttpSession activation and passivation listeners in Tomcat are 
/quite/ broken -- at least last time I checked.

I've been in the habit of patching this part of the code.  I submitted a 
patch once, but I mixed in a few other things that were broken in this 
area and it was not accepted -- and I've not taken time to slice up my 
patch into many smaller ones so they can be individually rejected :-)

[The above may sound bitter -- I'm not.  I just don't have the time to 
spoon feed patches, especially since I'm ending up patching the same 
file anyway to address persistent session handling.]

Giancarlo Frison wrote:
> I had faced the same problem, in order to 'activate' a deserialized
> object coming from an other VM the session object has to implement the
> HttpSessionBindingListener interface, not the
> *HttpSessionActivationListener* .
> The valueBound method is invoked by setAttibute's HttpSession method,
> inside there you would initialize and populate the transient fields.
>
>   
>> Hello
>>
>> I am using a *tomcat* *clustered* environment using two *tomcat*
>> *5*.*5*.*20*
>> servers *in* *the* Windows machine. I am using *the* *in*-memory
>> replication for
>> replicating *the* session. *In* my code, I have a session attribute that
>> implements *HttpSessionActivationListener* *interface*. I expect this
>> Listener to be *called* when *the* session gets replicated on *the* other
>> server. I see that *the* session gets replicated but *the* Listener is
>> *not*
>> *getting* *called* at all. I require this listener to be *called* so
>> that I
>> can *initialize* some of *the* transient session attributes when *the*
>> session
>> is created on one *tomcat* *instance* but *the* next request goes on
>> *the* other
>> server.
>>
>> Can you please let me know why *the* *HttpSessionActivationListener*
>> is *not*
>> *getting* *called*? Is *there* something which I am *not* doing
>> correctly?
>>
>>     
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message