The following example configures an application server to use a shared library.
Using Jacl:
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)
Using Jacl:
$AdminConfig create Library $server {{name mySharedLibrary} {classPath /mySharedLibraryClasspath}}
Example output:
MysharedLibrary(cells/mycell/nodes/mynode/servers/server1:libraries.xml#Library_1)
Using Jacl:
set appServer [$AdminConfig list ApplicationServer $server]
Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#ApplicationServer_1
To use the existing class loader associated with the server, the following commands use the first class loader:
Using Jacl:
set classLoaders [$AdminConfig showAttribute $appServer classloaders] set classLoader [lindex $classLoaders 0]Create a new class loader, by doing the following:
Using Jacl:
set classLoader [$AdminConfig create Classloader $appServer {{mode PARENT_FIRST}}]
Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#Classloader_1)
Using Jacl:
$AdminConfig create LibraryRef $classLoader {{libraryName MyshareLibrary} {sharedClassloader true}}
Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#LibraryRef_1)
Using Jacl:
$AdminConfig save