Scenario 1 will use more memory than scenarion 2. The ratio depends on the internal architecture of the classes. (What kind of object they create, where they store it)
If you just look at the core size that is needed to load the classes it roughly directly proportional to the number of webapp in scenario 2. But apart from that most classes need additional memory. (If the libray store all object in the session, the storage for this would change for both variants. If they store it in the classes it will make a difference) > -----Original Message----- > From: Lipov, Felix [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 10, 2004 2:55 PM > To: Tomcat Users List > Subject: Memory Usage/Common Lib > > > I have application a, b, c. Each application uses x.jar, y.jar and > z.jar. > > Scenario 1: > Each application is deployed with the three jars under their > respective > WEB-INF/lib directories. > > Scenario 2: > Nothing is placed in the respective WEB-INF/lib directories. > Rather the > three jars are placed in tomcat's common/lib directory. > > Would the memory usage of tomcat differ in the two cases? I'm assuming > yes, since in the first case the classes need to be loaded three times > more. In the second scenario, the classes from the jars would only be > loaded up once. Therefore Scenario 1, in terms of memory allocated to > the classloaded would be 3x more? I would like to get some feedback to > confirm or deny this. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
