• Post Reply Bookmark Topic Watch Topic
  • New Topic

Shared Libraries in WebSphere

 
Erick Kendall
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever I traverse the WebSphere directory where applications are installed I notice that there are duplicate "jar" files. Several apps may use (as an example) commons-codec-1.3.jar so there are several versions of the same file. Is there a simple or recomended way that shared libraries should be installed? If I'm using Spring (as an example) would I have all related "jar" under some directory like /opt/IBM/WebSphere/SpringLibrary?

Thank you,

Erick
 
Mohamed Sanaulla
Bartender
Posts: 3166
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Websphere not have a common lib directory which is used by all the deployed apps? Like we have $CATALINA_HOME\lib in tomcat.
 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may try and define a shared library via admin console. Basically, you define a path where you will place your commons jar.After doing so, associate your shared library to the classloader, and you're done.
My two cents: I definitely prefer to define my lib jars as utility jars of an ear containing my applications. I think it is a more fine grained approach which provides better isolation since ears classloaders are separated.
 
Paul Clapham
Sheriff
Posts: 21886
36
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is posted under "Performance" -- apart from using a small amount of extra disk space, is there a performance issue you have with putting duplicate copies of jar files in several web applications? I ask because although putting them in a common library seems like a good way to clean up, in actuality that can lead to numerous problems. First of all it introduces connections between applications which used to be independent. So if application A needs an updated version of some jar, you then have to ask what other applications are using that jar and whether they can work with the updated version. And second it can lead to classpath issues which are annoying to deal with, especially if the jars are trying to do logging (for example) for several applications.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!