aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Classic Tag Handlers - Are they thread safe? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Classic Tag Handlers - Are they thread safe?" Watch "Classic Tag Handlers - Are they thread safe?" New topic
Author

Classic Tag Handlers - Are they thread safe?

Subbaiah Annamalai
Greenhorn

Joined: Dec 17, 2007
Posts: 9
Hi All,

Are Classic Tag Handlers thread safe? HFSJ mentions [pg 837 second edition] that they are thread safe. Is it right? Because container may re-use the classic tag handler instances if there are multiple occurrences of the tag with same attribute values in same page or different jsp pages. In that case, same instance variables may get updated by multiple threads at the same time.

Is HFSJ incorrect? can anyone clarify this?

thanks
Subbaiah
Musab Al-Rawi
Ranch Hand

Joined: Aug 06, 2007
Posts: 231
Hi,

Each instance will handle a tag occurrence. It is like wen you have two String instances or two Book instances each instance will have its own data members.
so there are no thread issues here.


SCBCD - SCWCD - SCJD - SCJP - OCA
omi sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 489
Originally posted by Musab Al-Rawi:

so there are no thread issues here.


True,there is no headache of thread with tags


best regards,
omi
[ May 21, 2008: Message edited by: omi sharma ]

SCJP, OCA 9i application developer, SCWCD 5.
When I was in hell someone told me to get heaven you need to do Java.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Classic Tag Handlers - Are they thread safe?
 
Similar Threads
Final Mock Exam question 19
Exam Gotchas?
How to define multiple tag handlers
Question from HFJS 2nd Edition
Question 19 in mock exam