Configure a shared library

 


The following example configures an appserver to use a shared library.

  1. Identify the server id:

    set serverid [$AdminConfig getid /Cell:cellname/Node:nodename/Server:servername/]

  2. Create the shared library in the server:

    $AdminConfig create Library $serverid {{name SharedLibraryName} {classPath /usr/local/lib/}}

  3. Identify the appserver id from the server.

    set appServerid [$AdminConfig list ApplicationServer $server]

  4. Identify the class loader in the appserver and assign it to the classLoader variable.

    To use the existing class loader associated with the server, the following commands use the first class loader:

    set classLoaders [$AdminConfig showAttribute $appServerid classloaders]
    set classLoader [lindex $classLoaders 0]

  5. Create a new class loader, by doing the following:

    set classLoader [$AdminConfig create Classloader $appServerid {{mode PARENT_FIRST}}]

  6. Associate the created shared library with the appserver through the class loader.

    $AdminConfig create LibraryRef $classLoader {{libraryName SharedLibraryName} {sharedClassloader true}}

  7. Save changes:

    $AdminConfig save