• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shared Java Libraries

 
Kerry Baer
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running Tomcat 6. Several applications run on this server. Currently each application has it's own pool of libraries (JAR) contained in it's lib directory.

I am investigating the performance enhancements provided by moving all of the JARs into the shared Tomcat lib directory.

What performance gains do you get when you use shared libraries across projects?

What are the issues you come across with this approach?

Does it come down to preference?

Please chime in with your opinions and supporting facts. Thank you!
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't expect massive performance gains from this. Maybe webapps will start up a little bit faster when you start Tomcat, but probably it will be so little that you won't even notice it.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should result in smaller war/ear files for sure.

Also, you can ensure that all applications use the same version of the shared jars.

WP
 
Kerry Baer
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your response.

What about performance? That's my main concern.

Does it make a difference if different apps are running different versions of a library - memory consumption, objects created?

If all the apps are using the same versions of the libraries, then is there a performance difference between using a shared library and having the libraries included in each project?
 
Kerry Baer
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:I wouldn't expect massive performance gains from this. Maybe webapps will start up a little bit faster when you start Tomcat, but probably it will be so little that you won't even notice it.


Sorry I overlooked your post. Thank you for your input.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic