Skip to content

Support load time weaving in Liberty without the agent [SPR-16248] #20795

@spring-projects-issues

Description

@spring-projects-issues

Alasdair Nottingham opened SPR-16248 and commented

There is a load time weaver for WebSphere traditional so there is no need to specify the javaagent, but there isn't for the more modern WebSphere/Open Liberty which makes using Spring AOT on Liberty harder. The Liberty application classloader has the following method:

public boolean addTransformer(final ClassFileTransformer cft);

that can be used to register a java.lang.instrument.ClassFileTransformer. The method has a comment that says it is there for Spring, but it doesn't appear that it'll ever be called.

The current detection logic uses com.ibm. as an indicator on the class name for WebSphere and that isn't correct on Liberty.

The Liberty classloader code is here: https://github.com/OpenLiberty/open-liberty/blob/integration/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/AppClassLoader.java


Referenced from: commits d187cbc

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions