-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor EL to allow usage booth ASM implementations (standard provided by org.ow2.asm and internal org.eclipse.persistence.asm). Main reason behind this enhancement is quickly adopt new Java version as Java release cycle is quicker now. Usage of ASM implementation should controlled by new system property `eclipselink.asm.service` . There are following values possible eclipselink - use ASM implementation from org.eclipse.persistence.asm project (DEFAULT) ow2 - use ASM implementation from org.ow2.asm project If there is no value EclipseLink ASM implementation is used and as a fallback OW2. Various EclipseLink tests should be executed with this system property e.g. mvn verify -pl :org.eclipse.persistence.jpa.jse.test -P mysql -Declipselink.asm.service=ow2 mvn verify -pl :org.eclipse.persistence.jpa.jse.test -P mysql -Declipselink.asm.service=eclipselink mvn test -pl :org.eclipse.persistence.moxy -P test-moxy-lrg -Declipselink.asm.service=ow2 mvn test -pl :org.eclipse.persistence.moxy -P test-moxy-lrg -Declipselink.asm.service=eclipselink mvn clean verify -pl :org.eclipse.persistence.jpa.test -P test-jpa-lrg,mysql -Declipselink.asm.service=ow2 mvn clean verify -pl :org.eclipse.persistence.jpa.test -P test-jpa-lrg,mysql -Declipselink.asm.service=eclipselink mvn verify -pl :org.eclipse.persistence.jpa.testapps -amd -P mysql -Declipselink.asm.service=ow2 mvn verify -pl :org.eclipse.persistence.jpa.testapps -amd -P mysql -Declipselink.asm.service=eclipselink Code in this enhancement should be divided into following parts: Adapter/wrapper classes in org.eclipse.persistence.core module in org.eclipse.persistence.asm package. There are classes which translate calls from EclipseLink into ASM implementation. Code where is ASM used is pointed to org.eclipse.persistence.asm Java package. Required code changes in the rest of EclipseLink code base to use adapter/wrapper classes from the previous point. Major part of these changes is org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC -> org.eclipse.persistence.asm.Opcodes.valueInt("ACC_PUBLIC") or org.eclipse.persistence.internal.libraries.asm.Label l0 = new org.eclipse.persistence.internal.libraries.asm.Label(); -> org.eclipse.persistence.asm.Label l0 = org.eclipse.persistence.asm.ASMFactory.createLabel(); Dependency changes in pom.xml. ASM implementation artifacts are used as a compilation dependency in org.eclipse.persistence.core module and in the others usually as a dependency in test scope. JPMS change as package org.eclipse.persistence.internal.libraries.asm and module org.eclipse.persistence.asm is not used directly in project submodules. OSGi part is open now. There are test changes only in OSGiBundleTest.java. This change handle all scenarios how ASM is used in EclipseLink (sorted from most simple): Simple ASM method call or constant access without and in/out values conversion like org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC -> org.eclipse.persistence.asm.Opcodes.valueInt("ACC_PUBLIC") Method call with in/out value conversion like MethodVisitor mv = cw.visitMethod(.... Most complex are classes from EclipseLink which instances are passed into ASM implementation and some methods are overriden there and some not. These classes inherits from ASM classes like ClassVisitor, ClassReader, ClassWriter. See org.eclipse.persistence.internal.jpa.weaving.ClassWeaver, org.eclipse.persistence.internal.jpa.weaving.ComputeClassWriter, org.eclipse.persistence.internal.jpa.weaving.MethodWeaver ... Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
- Loading branch information
Showing
95 changed files
with
6,180 additions
and
1,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.