简体   繁体   中英

WebSphere liberty class loading PARENT LAST as default

I have been investigating using WebSphere's Liberty profile as a light weight alternative to having a fully fledged WebSphere instance deployed on my local machine (late to the party, I know).

1 thing that I can not figure out:

How do I set Parent Last class loading to be default? I want to deploy any application and have it automatically be parent last.

I am aware that I can deploy an EAR with the deployment.xml to trigger parent last class, or run a Jython script. However, I would rather have it be the default behavior.

Any ideas anyone?

WebSphere Version: Liberty 8.5.5.8

If you're trying to set parent-last classloading in Liberty because you had to do so in WebSphere Application Server traditional to resolve library conflicts, you should first try the application on Liberty without changing it's configuration because Liberty was designed to avoid those types of conflict. If, after that, you're still inclined to change the configuration, while you can't set it as the default, you can do something like this in your server.xml:

<enterpriseApplication location="myApp.ear" name="MyApp">
    <classloader delegation="parentLast"/>
</enterpriseApplication>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM