Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confusion regarding pool of tag handler instances

 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

In SCWCD Study kit by Hanumant Deshmukh ,while discussing release method() of Tag interface .there is an example:

......if the container implementation mentains a pool of tag handler instances, tha conatiner may reuse an instance of tag by calling tha sequence of setPageContext(),doStartTag(),doEndTag() multiple times.....

My query is

does conatiner maintains tag Handler insatnces for specific tag.
suppose I have created two tag
<test:tag1> and <test:tag2> will container maintain two set of instances .
i mean 2 different instance pool.
 
Muralidhar Adhikarla
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is confusing:
Here is what will happen:
if you say <mytags:tag1> and mytags:tag2> you are calling two differnt tags and the container will have 2 different instances:

But for the multiple invocations of <mytags:tag1> , the container will use the same tag instance and will call all the methods except the constructor and the realse() method.
Let me know if you have any query
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic