• 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

Does Tomcat load classes twice when they are in different apps?

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
just a question for my understanding: We use a little framework for our apps (comes with a lot from the Apache site and some stuff from a vendor and some stuff from us). So all apps share 80% of the classes used.
When creating the WAR file I always include the full set of classes, since I can't know if the stuff is already there. In terms of diskspace that is stupid (however how many GB can you buy for 1h of tech-support ;-) ).
Is it also stupid in terms of resource useage? Will Tomcat (5) load a class twice if it is identical, but stored twice in different directories?
I know we could deploy the common classes into /common/lib. But then we might interfere with other apps?
What is a good deployment strategy. I think if Tomcat is smart enough about the classes, our current approach is fair enough?
;-) stw
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a discussion of classloaders in Tomcat 5 here.
It looks to me like that page covers your question.
Bill
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William,
thx for the URL... and shame on me, I've overlooked the ..How To page!
;-) stw
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic