• 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 tag Instance pooling

 
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 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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic