• 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

Custom Tags

 
Author
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Custom Tags in my JSP pages, created as per our requirements . The thing is working fine.
However when i am checking code performance using "Optimize It", the results are rather surprising. The number of tag instances being created, just keeps mounting. Was under the impression that Websphere 4.0 Single Server Edition or for that matter any app server does pool tag instances and the same instances are used repeatedly. However the OptimizeIt results show otherwise.
Had earlier missed out overriding the release() method. However even on implementing it, there is apparently no reuse of instances. Also have put a
System.out.println("Just released : "+ this);
in the release method. And this is being called every time the tag is being used. Theoretically release() should be called only when the app server does not wish to pool the instance and just simply release it.
Also the hash code that is being printed is unique for every System.out ..So i suppose new instances are being created every time.
Kindly advice, if a change in code or in WebSphere config can take care of this problem so that instances are pooled and reused. Under extensive load, creation of 100s of these instances, i guess will kill the our system.
thanks and regards,
Harshad
(SCJP, SCWCD)
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The rules around tag handler instance reuse are fairly complicated and this is why few of the early web/app servers didn't implement this (optional) part of the JSP specification. Things are changing now though...
Have you tried asking in the Websphere forum?
Simon
 
Harshad Oak
Author
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posted to websphere.org list, javaranch's websphere forum and JSP forum. Considering the thousands of smart J2EE developers around, guess what, your's is the first reply i have received in 3 days.
Even when custom tags are being so widely used, is nobody still sure as to how the thing really works.
Thanks simon. Hope i get an answer somewhere.
 
Simon Brown
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll have a quick scan through the docs when I get a minute although I have a feeling that Websphere doesn't support tag handler instance pooling...
 
Harshad Oak
Author
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks simon for trying to help out as regards tag instance pooling on WebSphere.
Have you managed to procure any additional info on the same? Unfortunately i haven't been able to find much.
harshad
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic