2

I have a ear file and it references few jar files at runtime. We created a shared library using websphere admin console. But for referencing the shared library we are looking for a way to configure the shared library using deployment descriptors. Any help on how to do it, which deployment descriptor file to modify to specify the shared lib?

Thanks,

user1019072
  • 299
  • 1
  • 7
  • 17

2 Answers2

3

The short answer is by using the websphere-specific deployment.xml descriptor inside EARs META-INF.

You should put that file inside the following dir tree META-INF/ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp/deployment.xml, then locate the classloader section and set the shared library inside classloader tag as follows:

<classloader xmi:id="Classloader_1454339476980" mode="PARENT_FIRST">
 <libraries libraryName="myshared lib" sharedClassloader="true"/>
</classloader>
trikelef
  • 2,192
  • 1
  • 22
  • 39
0

In my opinion, the easiest is to use Installed Optional Packages.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90