// Interceptor registration not needed, core configuration handling
// already does it for all custom interceptors - UNLESS the InterceptorChain already exists in the component registry!
InterceptorChain ic = cr.getComponent(InterceptorChain.class);
ConfigurationBuilder builder = new ConfigurationBuilder().read(cfg);
InterceptorConfigurationBuilder interceptorBuilder = builder.customInterceptors().addInterceptor();
interceptorBuilder.interceptor(queryInterceptor);
if (!cfg.transaction().transactionMode().isTransactional()) {
if (ic != null) ic.addInterceptorAfter(queryInterceptor, NonTransactionalLockingInterceptor.class);
interceptorBuilder.after(NonTransactionalLockingInterceptor.class);