Configure a shared library using wsadmin
Using Jacl...
### Configure a shared library set server [$AdminConfig getid /Cell:cell/Node:node/Server:server/] $AdminConfig create Library $server \ { \ {name mysharedlib} \ {classPath /path/to/mysharedlib} \ } set appServer [$AdminConfig list ApplicationServer $server] ### To use the existing class loader associated with the ### server, the following commands use the first class loader... set classLoaders [$AdminConfig showAttribute $appServer classloaders] set classLoader [lindex $classLoaders 0] set classLoader [$AdminConfig create Classloader $appServer {{mode PARENT_FIRST}}] ### Associate the created shared library with the appserver through ### the class loader. $AdminConfig create LibraryRef $classLoader \ { \ {libraryName MyshareLibrary} \ {sharedClassloader true} \ } $AdminConfig save
Using Jython
server = AdminConfig.getid('/Cell:cell/Node:node/Server:server/') print server print AdminConfig.create('Library', server, [['name', 'mysharedlib'], ['classPath', '/path/to/mysharedlib']]) appServer = AdminConfig.list('ApplicationServer', server) print appServer classLoaders = AdminConfig.showAttribute(appServer, 'classloaders') cleanClassLoaders = classLoaders[1:len(classLoaders)-1] classLoader = cleanClassLoaders.split(' ')[0] classLoader = AdminConfig.create('Classloader', appServer, [['mode', 'PARENT_FIRST']]) print AdminConfig.create('LibraryRef', classLoader, [['libraryName', 'MyshareLibrary'], ['sharedClassloader', 'true']]) AdminConfig.save()