Skip to content

BETA BLOG - overrideLibrary support for application classloader #32778

@tjwatson

Description

@tjwatson

The information you provide here will be included in the Open Liberty beta blog post (example), which will be published on openliberty.io/blog/, and potentially elsewhere, to promote this beta feature/function of Open Liberty. For this post to be included in the beta issue please make sure that this is completed by the end of Friday following the GM (Tuesday). The beta and release blogs are created using automation and rely on you following the template's structure. DO NOT REMOVE/ALTER THE <GHA> TAGS THROUGHOUT THIS TEMPLATE.

<GHA-BLOG-SUMMARY>

For the 25.0.0.10-beta, a new library reference type is available for an application's <classloader/> configuration that is used to configure an override library. Similar to private library references, class insteances are unique to the application's classloader, independent of class instances from other classloaders. The referenced override library class path is searched before searching the application classloader's own class path. This allows a library path to override classes contained in an application.

For example, if there is an <webApplication/> that contains a class org.acme.needs.fix.SomeImpl that needs to be overridden in order to fix an issue, but it is difficult or undesirable to rebuild the application to pull in the fix a new library JAR (e.g. someImplFix.jar) could be built to include the class files that need to be fixed. Then the following server.xml could be used to configure an overrideLibraryRef to fix the application without requiring the application to be rebuilt:

<webApplication location="appThatNeedsFix.war">
    <classloader overrideLibraryRef="someImplFix"/>
</webApplication>

<library id="someImplFix">
     <path name="someImplFix.jar"/>
</library>
</GHA-BLOG-SUMMARY>

What happens next?

  • Add the label to the blog issue for the beta you're targeting (e.g. target:YY00X-beta).
  • Make sure this blog post is linked back to the Epic for this feature/function.
  • Your paragraph will be included in the beta blog post. It might be edited for style and consistency.
  • You will be asked to review a draft before publication.
    • Once you've approved the code review, close this issue.
  • If you would also like to write a standalone blog post about your update (highly recommended), raise an issue on the Open Liberty blogs repo. State in the issue that the blog post relates to a specific release so that we can ensure it is published on an appropriate date (it won't be the same day as the beta blog post).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions