Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
cmbhatt
SCJP 1.4 - SCWCD 1.4
cmbhatt
cmbhatt
Originally posted by Chandra Bhatt:
Even if I remove the line req.getSession().removeAttribute("key");
output is same.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Am i missing something here?
rgrds,
Khushhal
Originally posted by khushhal yadav :
See once something bounds then only previous thing unbounds.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
rgrds,
Khushhal
Originally posted by khushhal yadav:
See an object is eligible for garbage collection, only when it's reference has been assigned to either null or some other object.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Here I tried to explain the same thing in other context.Don't correlate it compeletly with your senario.
I agree there can be a justification saying that whenever you replace an existing value the replacement happens first because of which automatically the existing value gets unbounded.
rgrds,
Khushhal
Originally posted by khushhal yadav:
That's the real thing
And answer to your query.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Promod Mahajan:
I tried this on Tomcat, the result was BBUBUB (Bound Bound Unbound Unbound).
It seems counterintuitive, I would have guessed Bound Unbound Bound Unbound too if I did not read this thread. Can someone explain this.
Here is the section from the spec (SRV.7.4) that might be relevant esp the last paragraph.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Michael Ku:
There are a lot of explanations here but very few people have actually tried it and posted the results. Would some of you please try it and post the results?
Thank you
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Promod Mahajan:
Raghavan,
What I am not clear about is what you mentioned as a doubt in your explanation. Why is the valueBound called the second time before the first valueUnbound is called.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
I was just trying to make the point that there is never a substitute for trying something vs. theorizing what happens (the scientific or empirical method)
[My Blog]
All roads lead to JavaRanch
I just ran the test using WebSphere 5.1 server and I got BUBBUB (Bound Unbound Bound Unbound)
I cannot remember what server I used when I was preparing for the exam but I seem to remember that the book was correct.
Is anyone else getting BUBBUB?
Originally posted by Michael Ku:
has anyone else run this on WebSphere? Is there anyone that would please run this on WebSphere and let me know what the result was?
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Originally posted by Srinivasan thoyyeti:
So specification is not strict enough to guess the correct answer for us.
Hence we got distinct answers in tomcat,websphere.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
cmbhatt
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Michael Ku:
Raghavan, thank you for trying this on WebSphere and confirming my findings
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Promod Mahajan:
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Don't get me started about those stupid light bulbs. |