rmannibucau commented on pull request #64:
URL: https://github.com/apache/openjpa/pull/64#issuecomment-657757931


   @jgrassel Hmm, a few things which makes this fix looking very weird to me:
   
   1. fact is it is already synchronized by metadatarepository until 
Preload=true (see org.apache.openjpa.meta.MetaDataRepository#preload) so 
concurrency here is very unlikely so removing the threadlocal (and boolean) 
sounds better to me - I guess only Geronimo (and maybe WAS?) was using it out 
there due to a not conrrectly configured temp loader.
   2. that _transforming boolean was not here for exactly what you describe but 
for the case you load a transformed class and - using the javaagent, not a 
deploy time or build time enhancement - you load openjpa 
(org.apache.openjpa.enhance.PCEnhancer typically but a few other classes as 
well).
   3. a correct concurrent classloader locks around transform so the case you 
describe does not really happen and the boolean protection is not needed even 
with the javaagent (classloader#loadclass > findClass > transform for custom 
classloaders or loadclass > findclass > defineClass > transform for the jvm 
classloader)
   
   So at the end it sounds like a bug in the classloader you use in openliberty 
so I would fix it there.
   
   BTW where is Albert's review? I can't see it it seems.


----------------------------------------------------------------
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


Reply via email to