WebSphere liberty class loading PARENT LAST as default

廉价感情. 提交于 2019-12-01 21:42:28

问题


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


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!