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>
来源:https://stackoverflow.com/questions/35367295/websphere-liberty-class-loading-parent-last-as-default