Bug 34984 - HttpSessionBindingEvent.getName() returns null in cluster and distributal
HttpSessionBindingEvent.getName() returns null in cluster and distributal
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina:Cluster
5.0.28
Other other
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-05-20 12:15 UTC by Raul Benito
Modified: 2005-10-20 06:22 UTC (History)
0 users



Attachments
A war with source & compiled code. (2.94 KB, application/octet-stream)
2005-05-20 12:18 UTC, Raul Benito
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raul Benito 2005-05-20 12:16:03 UTC
The HttpSessionBindingEvent.getName() returns null when used in
HttpSessionListener.attributeAdded, and the application is marked
distributable(in a cluster configuration, but it doen't matter if there is only
one node in the cluster).

I have attached a test that shows this behaviour:
The output when the application is not marked distributable:

Replicating a session
cheking event.getSession(  )=org.apache.catalina.session.StandardSessionFacade@f
42160
cheking event.getSession(  ).getId( )=67D7ED949770118ECCE414F7A16E3D3C
checking event.getName()=attrName
checking event.getValue()=attrValue
Test ok.

The output when the application is marked distributable (in the WEB-INF):

Replicating a session
cheking event.getSession( 
)=org.apache.catalina.cluster.session.DeltaSessionFacade@b3cac9
cheking event.getSession(  ).getId( )=037FD127C843A30552D411A6CC513EB6
checking event.getName()=attrName
checking event.getValue()=null
getValue() not correct!!!!
Testk not ok!!!!


Regards,
Comment 1 Raul Benito 2005-05-20 12:18:51 UTC
Created attachment 15086 [details]
A war with source & compiled code.

To test hit: http://localhost:8080/TestTomcat/test.jsp and look at the console
output.
Comment 2 Raul Benito 2005-05-20 12:24:19 UTC
Sorry is getValue() what is returning null, not getName().
Comment 3 Yoav Shapira 2005-10-16 23:21:09 UTC
Raul, does this still happen in 5.5.12?  I tried to use your WAR file but it
provides no console output.
Comment 4 Peter Rossbach 2005-10-20 09:37:53 UTC
Hola,

your war is wrong bundled, but after I moved the test at correct directory
structure I see the problem and fix it :-) See changes at DeltaSession Revision
326850!

Many thanks to pointing out this
Peter
Comment 5 Raul Benito 2005-10-20 14:22:14 UTC
(In reply to comment #4)
> Hola,
> 
> your war is wrong bundled, but after I moved the test at correct directory
> structure I see the problem and fix it :-) See changes at DeltaSession Revision
> 326850!
> 
> Many thanks to pointing out this
> Peter

You are right, sorry for the problems in the war.
Now it is fixed. 
Thanks a lot