Thoughts and Tutorials about Continuous Integration, Application Integration, SOA, IT Architecture, WebSphere and Liferay

Sep 22, 2014

How to configure shared libraries in WebSphere

If you need some ressources like 3rd party libs in your application you can load them with a classloader. To do this you have to configure shared libraries in your websphere configuration first.

How to configure class loader in WebSphere

There are many reasons to load classes in a seperate classloader. Perhaps you need to load some classes before your application is able to start.

1. Put your libs (e.g. jar files) in a folder in your local file system.

2. Open your Admin Console, create shared libs and reference the file system path from step 1.

3. Create a classloader on your jvm and reference the shared lib config.
So switch to the jvm configuration page and klick on "Class loader" in
"Java and Process Management" tree.

Create a new Class loader by clicking the "new" button.
In the next step you have to choose your class loader order for the newly created class loader.

Then click on apply button.
Next you have to reference the shared libs created on step 2. So click on "Shared libraries references"
on the right side.

Choos your shared libs from the drop down list and klick ok button.

4. Now save you configuration and start/restart your jvm.