Search code examples
webspherejava-ee-7

Websphere Application Server Classloader policy


How do I set "Classloader policy" to "Single" from config file or programatically on websphere apllication server , since I don't have access to admin console.


Solution

  • Take a look at the instructions for Modifying WAR class loader policies for applications using wsadmin scripting. If you also want to modify the application classloader policy for a server, take a look at the following wsadmin Jython example that modifies both the application classloader policy and delegation mode for server "server1". Be sure to synchronize configuration modifications to the nodes when using IBM WebSphere Application Server Network Deployment.

    wsadmin> appSrv=AdminConfig.getid("/Server:server1/ApplicationServer:/")
    wsadmin> AdminConfig.modify(appSrv, '[[applicationClassLoaderPolicy "SINGLE"] [applicationClassLoadingMode "PARENT_LAST"]]')
    wsadmin> AdminConfig.save()