Source:
<code>public Supplier<EntityViewManager> entityViewManagerSupplier(BlazePersistenceInstanceConfiguration blazePersistenceConfig, String blazePersistenceInstanceName, Set<String> entityViewClasses, Set<String> entityViewListenerClasses) { return () -> { EntityViewConfiguration entityViewConfiguration = EntityViews.createDefaultConfiguration(); for (String entityViewClass : entityViewClasses) { try { entityViewConfiguration.addEntityView( <START> Thread.currentThread().getContextClassLoader().loadClass(entityViewClass) <END> ); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } for (String entityViewListenerClass : entityViewListenerClasses) { try { entityViewConfiguration.addEntityViewListener( Thread.currentThread().getContextClassLoader().loadClass(entityViewListenerClass) ); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } blazePersistenceConfig.apply(entityViewConfiguration); entityViewConfiguration.setProperty(ConfigurationProperties.PROXY_UNSAFE_ALLOWED, Boolean.FALSE.toString()); Annotation[] cbfQualifiers; if (BlazePersistenceInstanceUtil.isDefaultBlazePersistenceInstance(blazePersistenceInstanceName)) { cbfQualifiers = new Annotation[] { new Default.Literal() }; } else { cbfQualifiers = new Annotation[] { new BlazePersistenceInstance.BlazePersistenceInstanceLiteral(blazePersistenceInstanceName) }; } CriteriaBuilderFactory cbf = Arc.container().instance(CriteriaBuilderFactory.class, cbfQualifiers).get(); return entityViewConfiguration.createEntityViewManager(cbf); }; }</code><technical_language>Move this out of loop Thread.currentThread().getContextClassLoader()</technical_language>

Target:
public Supplier<EntityViewManager> entityViewManagerSupplier(BlazePersistenceInstanceConfiguration blazePersistenceConfig, String blazePersistenceInstanceName, Set<String> entityViewClasses, Set<String> entityViewListenerClasses) { return () -> { EntityViewConfiguration entityViewConfiguration = EntityViews.createDefaultConfiguration(); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); for (String entityViewClass : entityViewClasses) { try { entityViewConfiguration.addEntityView( classLoader.loadClass(entityViewClass) ); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } for (String entityViewListenerClass : entityViewListenerClasses) { try { entityViewConfiguration.addEntityViewListener( classLoader.loadClass(entityViewListenerClass) ); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } blazePersistenceConfig.apply(entityViewConfiguration); entityViewConfiguration.setProperty(ConfigurationProperties.PROXY_UNSAFE_ALLOWED, Boolean.FALSE.toString()); Annotation[] cbfQualifiers; if (BlazePersistenceInstanceUtil.isDefaultBlazePersistenceInstance(blazePersistenceInstanceName)) { cbfQualifiers = new Annotation[] { new Default.Literal() }; } else { cbfQualifiers = new Annotation[] { new BlazePersistenceInstance.BlazePersistenceInstanceLiteral(blazePersistenceInstanceName) }; } CriteriaBuilderFactory cbf = Arc.container().instance(CriteriaBuilderFactory.class, cbfQualifiers).get(); return entityViewConfiguration.createEntityViewManager(cbf); }; }