]
David Lloyd commented on WFLY-10025:
------------------------------------
That's OK; we still need to make the switch though because with the modular JDK, the
{{java.instrument}} module which contains the old {{ClassFileTransformer}} interface may
or may not be available in a given runtime image.
Converting from array to {{ByteBuffer}} does not incur a copy (using the {{wrap()}}
method). Converting from {{ByteBuffer}} to array _may_ incur a copy. See [this example
in JBoss
Use new org.jboss.modules.ClassTransformer interface instead of
j.l.i.ClassFileTransformer
------------------------------------------------------------------------------------------
Key: WFLY-10025
URL:
https://issues.jboss.org/browse/WFLY-10025
Project: WildFly
Issue Type: Enhancement
Components: JPA / Hibernate
Reporter: David Lloyd
Assignee: Scott Marlow
Priority: Minor
The JPA classes use {{java.lang.instrument.ClassFileTransformer}} for class
transformation, however this style of transformer incurs an extra whole-byte-array copy
when loading memory-mapped classes or using other resource loaders which operate on byte
buffers.
After the Modules 1.8.0.Final upgrade, switch to using
{{org.jboss.modules.ClassTransformer}} instead.