Skip to content

Jandex extended path #8451

Description

@tbitonti

Feature epic details

Operating systems

Does the documentation apply to all operating systems?

  • Yes
  • No; specify operating systems: ______

Summary

Provide a concise summary of your feature. What is the update, why does it matter, and to whom? What do 80% of target users need to know to be most easily productive using your runtime update?

Configuration:

Elements: applicationManager, application
Attribute: enableWebInfJandex
Description: When performing class scans, when "useJandex" is true, also look for a jandex index under "/WEB-INF/classes/META-INF/jandex.idx".
Possible values: true | false
Default value: false

Examples

 <applicationManager useJandex="true" enableWebInfJandex="true"/>
 <application location="TestServlet40.ear" useJandex="true" enableWebInfJandex="true"/>

Discussion

Initial Liberty support for jandex looks for jandex indices at "/META-INF/jandex.idx" relative to module roots. That is correct for EJB modules, but is incorrect for web modules. The industry standard location for jandex indices within web modules is relative to the web module class path root: "/WEB-INF/classes/META-INF/jandex.idx".

The new attribute enableWebInfJandex enables support for the industry standard location, "/WEB-INF/classes/META-INF/jandex.idx". When the new attribute is enabled, when processing web modules, Liberty looks for jandex indices in both the original location relative to the module root, and at the industry standard location relative to the web module class path root. (If indices are present at both locations, the "/META-INF/jandex.idx" location has precedence.)

The new attribute may be used in the applicationManager element and in the application element. When used in the applicationManager element, the attribute value applies to all applications. When used in an application element, the attribute value applies to that one application. (A value supplied in the application element overrides a value supplied in the applicationManager element, for that one application.)

To reduce migration risks, the new attribute is an opt-in attribute. The default value is false. A true value must be explicitly set to enable support for the new location.

Support for jandex is not enabled by default. The useJandex option must be explicitly set to true to enable jandex support. The new enableWebInfoJandex option is meaningful only when useJandex is true.

Updates to existing topics

The attribute is being added to two existing configuration elements, application and applicationManager.

https://openliberty.io/docs/latest/reference/config/applicationManager.html
https://openliberty.io/docs/latest/reference/config/application.html

Create a new topic

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions