volvox
volvox

Reputation: 3060

WebSphere 6.1 Change Class loader order

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.

Upvotes: 0

Views: 5353

Answers (2)

Dirk Kilian
Dirk Kilian

Reputation: 11

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

Upvotes: 1

rwijngaa
rwijngaa

Reputation: 192

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.

Upvotes: 1

Related Questions