WebSphere 6.1 更改类加载器顺序

发布于 2024-09-30 15:11:58 字数 338 浏览 1 评论 0原文

我想将部署到 WAS6.1 的 Web 模块上的类加载器委托顺序从默认的父级第一个更改为父级最后一个。原因是我想使用 JSF 1.2 等,而 WAS6.1 通常不支持它。

在本地部署实例的集成解决方案控制台中,在企业应用程序>下:我的AppEAR管理模块> MyApp.war 类加载器顺序下拉列表显示为灰色。

  1. 为什么它是灰色的?
  2. 我怎样才能将其取消灰色?
  3. 在部署描述符中放入指令会更好吗?
  4. 如果 (3) 的答案不是“否”,请您准确指定执行此操作的代码。

我一生都无法在网络上找到这些问题的答案。

I want to change the class loader delegation order on a web module deployed to WAS6.1 from it's default of parent first to parent last. The reason is I would like to use JSF 1.2 etc and WAS6.1 doesn't normally support it.

In the integrated solutions console for the locally deployed instance, under Enterprise Applications > MyAppEAR > Manage Modules > MyApp.war the Class loader order drop down is greyed out.

  1. Why is it greyed out?
  2. How can I ungrey it out?
  3. Would it be better to put a directive in the deployment descriptor?
  4. If the answer to (3) is anything other than No, please can you specify exactly the code to do this.

I can't for the life of me find the answers to these questions on the web.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

玉环 2024-10-07 15:11:58

我也有同样的事情。我需要将类加载器设置为 PARENT_LAST 但该设置呈灰色。我通过手动将deployment.xml文件(下面的内容)放入ear项目的META-INF/ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp中来“解决”它。

    <?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1212499072929">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1212499072929" startingWeight="10">
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1212499072929" startingWeight="10000" uri="yourwarproject.war" classloaderMode="PARENT_LAST"/>
    <classloader xmi:id="Classloader_1212499072929" mode="PARENT_LAST"/>
  </deployedObject>
</appdeployment:Deployment>

希望这有帮助。

I had the same thing. I needed to set the classloader to PARENT_LAST but the setting was greyed out. I 'solved' it by manually putting a deployment.xml file (contents below) in META-INF/ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp of your ear project.

    <?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1212499072929">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1212499072929" startingWeight="10">
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1212499072929" startingWeight="10000" uri="yourwarproject.war" classloaderMode="PARENT_LAST"/>
    <classloader xmi:id="Classloader_1212499072929" mode="PARENT_LAST"/>
  </deployedObject>
</appdeployment:Deployment>

Hope this helps.

橘虞初梦 2024-10-07 15:11:58

我也有同样的问题!
我需要更改:

  • 启用类的重新加载:reloadEnabled =“true”
  • 更新间隔:??? (仍在搜索,任何帮助表示赞赏)

这里是我的部署 xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1310499119656">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1310499119656" startingWeight="10" warClassLoaderPolicy="SINGLE" reloadEnabled="true">
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1310499119656" startingWeight="10000" uri="tcm_portal_web_six.war" classloaderMode="PARENT_LAST"/>
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1310499119657" startingWeight="10000" uri="tcm_portal_lib.war" classloaderMode="PARENT_LAST"/>
    <classloader xmi:id="Classloader_1310499119656" mode="PARENT_LAST"/>
  </deployedObject>
</appdeployment:Deployment>

BR
短剑

I had the same problem!
I needed to change:

  • enable reload of classes: reloadEnabled="true"
  • update interval: ??? (still searching, any help appreciated)

here my deployment xml file:

<?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1310499119656">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1310499119656" startingWeight="10" warClassLoaderPolicy="SINGLE" reloadEnabled="true">
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1310499119656" startingWeight="10000" uri="tcm_portal_web_six.war" classloaderMode="PARENT_LAST"/>
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1310499119657" startingWeight="10000" uri="tcm_portal_lib.war" classloaderMode="PARENT_LAST"/>
    <classloader xmi:id="Classloader_1310499119656" mode="PARENT_LAST"/>
  </deployedObject>
</appdeployment:Deployment>

BR
Dirk

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文