rmannibucau edited a comment on pull request #64: URL: https://github.com/apache/openjpa/pull/64#issuecomment-658034247
@struberg point is that the classloader does it and the transformer is called under that lock already @jgrassel will test your sample but today I'm off but I will come back to you likely tomorrow, thanks a lot for setting up a project! edit: tested on tomee adding: <plugin> <groupId>org.apache.tomee.maven</groupId> <artifactId>tomee-maven-plugin</artifactId> <version>8.0.3</version> </plugin> It works as expected: Starting Worker thread 1... Starting Worker thread 2... Worker thread Thread-63 started. Worker Threads Complete. Now to verify enhancement. Look at the interfaces associated with EntityA and EntityC: Worker thread Thread-64 started. Worker thread Thread-63 finished. Worker thread Thread-64 finished. Class: model.EntityA Interfaces: org.apache.openjpa.enhance.PersistenceCapable Class: model.EntityC Interfaces: org.apache.openjpa.enhance.PersistenceCapable he.openjpa.enhance.PersistenceCapable Worker Threads Complete. Now to verify enhancement. Look at the interfaces associated with EntityA and EntityC: Worker thread Thread-66 finished. Class: model.EntityA Interfaces: org.apache.openjpa.enhance.PersistenceCapable Class: model.EntityC Interfaces: org.apache.openjpa.enhance.PersistenceCapable In particular with the proposed patch ^^. Any way to patch liberty locally to run openjpa (creating my liberty.openjpa.jar with blueprint registration maybe?). edit 2: just checked openliberty sources (https://github.com/OpenLiberty/open-liberty/ right?), seems all classloaders are marked as concurrent but wrongly get the lock, in particular when there is a transformer so this is not an openjpa issue but an openliberty issue, no? Look https://github.com/OpenLiberty/open-liberty/blob/integration/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/AppClassLoader.java#L272 for ex, if no transformer is it correctly impl, if there is a transfomer it bypasses the lock :s. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org