• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HttpSessionBindingListener is called when attribute is replaced?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
simple question:
HttpSessionBindingListener is called when attribute is replaced?

According to a mock exam I�m using, only HttpSessionAttributeListener is called when attribute is replaced. It seems wrong to me because the if an attribute with the same name was bounded to the session, and it�s replaced, it is unbounded before the new values it bounded (am i right?).

So if this attribute implements HttpSessionBindingListener, should�t it be notified (valueUnbound method)?

I�ve not tried yet, but i�ll look for it on the specification. But if someone already found or knows the right anwser, please post it. Thanks!
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, this question was asked many times on this forum. And you may be sure, that HttpSessionBindingListener is called, whan attribute is replaced by another attribute in the session.
 
bengt hammarlund
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply. Actually I allways search before posting, but I did not found any one specifically about it.

And I read the servlet specification, and didn't found anything about it.
If someone knows where this is specified on the servlet specification (if it is at all), please share.
 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, if i was too tough.
You can look here:
https://coderanch.com/t/170171/java-Web-Component-SCWCD/certification/jdiscuss
https://coderanch.com/t/169992/java-Web-Component-SCWCD/certification/Session-Listeners-Questions
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are right
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic