@Test public void test_bootstrap_bootstrap_native_registry_BootstrapServiceRegistry_example() { ClassLoader customClassLoader = Thread.currentThread().getContextClassLoader(); Integrator customIntegrator = new BeanValidationIntegrator(); //tag::bootstrap-bootstrap-native-registry-BootstrapServiceRegistry-example[] BootstrapServiceRegistryBuilder bootstrapRegistryBuilder = new BootstrapServiceRegistryBuilder(); // add a custom ClassLoader bootstrapRegistryBuilder.applyClassLoader( customClassLoader ); // manually add an Integrator bootstrapRegistryBuilder.applyIntegrator( customIntegrator ); BootstrapServiceRegistry bootstrapRegistry = bootstrapRegistryBuilder.build(); //end::bootstrap-bootstrap-native-registry-BootstrapServiceRegistry-example[] }
public IntegratorServiceImpl(LinkedHashSet<Integrator> providedIntegrators, ClassLoaderService classLoaderService) { // register standard integrators. Envers and JPA, for example, need to be handled by discovery because in // separate project/jars. addIntegrator( new BeanValidationIntegrator() ); addIntegrator( new JaccIntegrator() ); addIntegrator( new CollectionCacheInvalidator() ); // register provided integrators for ( Integrator integrator : providedIntegrators ) { addIntegrator( integrator ); } for ( Integrator integrator : classLoaderService.loadJavaServices( Integrator.class ) ) { addIntegrator( integrator ); } }
public IntegratorServiceImpl(LinkedHashSet<Integrator> providedIntegrators, ClassLoaderService classLoaderService) { // register standard integrators. Envers and JPA, for example, need to be handled by discovery because in // separate project/jars. addIntegrator( new BeanValidationIntegrator() ); // register provided integrators for ( Integrator integrator : providedIntegrators ) { addIntegrator( integrator ); } for ( Integrator integrator : classLoaderService.loadJavaServices( Integrator.class ) ) { addIntegrator( integrator ); } }
public IntegratorServiceImpl(LinkedHashSet<Integrator> providedIntegrators, ClassLoaderService classLoaderService) { // register standard integrators. Envers and JPA, for example, need to be handled by discovery because in // separate project/jars. addIntegrator( new BeanValidationIntegrator() ); // register provided integrators for ( Integrator integrator : providedIntegrators ) { addIntegrator( integrator ); } for ( Integrator integrator : classLoaderService.loadJavaServices( Integrator.class ) ) { addIntegrator( integrator ); } }
public IntegratorServiceImpl(LinkedHashSet<Integrator> providedIntegrators, ClassLoaderService classLoaderService) { // register standard integrators. Envers and JPA, for example, need to be handled by discovery because in // separate project/jars. addIntegrator( new BeanValidationIntegrator() ); addIntegrator( new JaccIntegrator() ); addIntegrator( new CollectionCacheInvalidator() ); // register provided integrators for ( Integrator integrator : providedIntegrators ) { addIntegrator( integrator ); } for ( Integrator integrator : classLoaderService.loadJavaServices( Integrator.class ) ) { addIntegrator( integrator ); } }