Shared Library

Shared libraries allow you to attach set of .jar files to application or server. Ex. Most of the portlets in your company are using JSF as MVC framework or say set of Apache Axis jars so instead of copying all the .jar files required by portlets in the WEB-INF/lib folder of every portlet you can create a directory on your server copy all the required jars in that directory and add that directory to the classpath of either your server or your portlet application.

Creating a shared library

You can create a shared library by following these steps

  • Create c:\temp\shared directory on your machine and copy all the .jar files in this directory

  • Log into the WAS Admin console and go to Environment -> Shared Libraries. Choose the appropriate scope and click on New

    On this screen assign name to the shared lib and set the class path for that shared lib.

This is how you create testsharedlib shared library.

Now you have two choices either you can make this shared lib available to all the enterprise applications in your server, which is called server level shared lib or you can assign this shared libs to few applications by adding application level shared lib.

No comments: