3 replies Latest Post - ‏2013-10-03T10:24:45Z by bpaskin
1 Post

Pinned topic Classloader policy liberty profile server

‏2013-09-30T13:53:17Z |

Re: Setting the classloader policy on a web module level added to an EAR application on WAS Liberty profile server

Iam trying to migrate our RAD 6 EAR deployed on was6.1 application to Eclipse IDE using WAS liberty profile server 8.5.5.

The query I have is I don't  see option to set the classloader policy of one of the web module of my enterprise application to "parent last". This was possible when I was using RAD6 with WAS6.1 server. But I dont see any option when I use Eclispe IDE with WAS liberty profile server.

Consider an enterprise application -TestEAR with 2 web modules "WebProject1" and "WebProject2". I want to change the classloader policy of "WebProject2"  to parent_last and also set "startingWeight".

In RAD IDE I can change the classloader policy of each web module added to the Enterprise application, by going to application deployment descriptor and selecting deployment tab.

Now I have build my Enterprise application with web modules on Eclipse IDE and deployed the enterprise application to Liberty profile 8.5.5 server. In Eclispe IDE I dont have a editor with deployment tab to update deployment descriptor file

The only option I see is to go to server.xml on the liberty profile server as shown below

<server description="new server">    ..
    <enterpriseApplication id="TestEAR" location="TestEAR.ear"  name="TestEAR">
     <classloader delegation="parentLast"></classloader>

Here I can chane the classloader policy at the enterprise application level, I dont see option to change the classloader policy of the individual web module added to the TestEAR. Also similarly I dont have option to change the starting weight of the web module.  Please help.


  • bpaskin
    3838 Posts

    Re: Classloader policy liberty profile server

    ‏2013-10-02T19:21:52Z  in response to saishm71

    Hi, Liberty Profile is NOT a full blown Full Profile JEE App Server, like WAS.  There are a myriad of differences, namely that Liberty runs only the Web Profile.  You must update the server.xml to achieve some classloader behaviors, which you noted above.  There is no way in the server.xml to set the webapp classloading.  This needs to be done programmatically. Look under WebContext.setParentLoaderPriority(boolean).