简体   繁体   English

WebSphere自由类将PARENT LAST加载为默认值

[英]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). 我一直在研究使用WebSphere的Liberty配置文件作为在我的本地计算机上部署完全成熟的WebSphere实例的轻量级替代方案(我知道派对的时间已晚)。

1 thing that I can not figure out: 我无法弄清楚的一件事:

How do I set Parent Last class loading to be default? 如何将Parent Last类加载设置为默认值? 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. 我知道我可以使用deployment.xml部署一个EAR来触发父类最后一个类,或者运行一个Jython脚本。 However, I would rather have it be the default behavior. 但是,我宁愿让它成为默认行为。

Any ideas anyone? 任何人的想法?

WebSphere Version: Liberty 8.5.5.8 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. 如果您尝试在Liberty中设置父级最后一个类加载,因为您必须在传统的WebSphere Application Server中执行此操作以解决库冲突,您应首先在Liberty上尝试应用程序而不更改其配置,因为Liberty旨在避免这些类型的冲突。 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: 如果在此之后,您仍然倾向于更改配置,而您无法将其设置为默认配置,则可以在server.xml中执行以下操作:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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