Don't show SharedDriverManagerConnectionProviderImpl usage in event documentation

This commit is contained in:
Christian Beikov 2023-01-03 10:31:05 +01:00
parent ccf4fac124
commit 0962144583
1 changed files with 6 additions and 1 deletions

View File

@ -78,10 +78,15 @@ public class InterceptorTest extends BaseEntityManagerFunctionalTestCase {
public void testSessionFactoryInterceptor() {
Serializable customerId = 1L;
//tag::events-interceptors-session-factory-scope-example[]
SessionFactory sessionFactory = new MetadataSources(new StandardServiceRegistryBuilder()
.applySetting(AvailableSettings.CONNECTION_PROVIDER, SharedDriverManagerConnectionProviderImpl.getInstance())
.build())
/*
//tag::events-interceptors-session-factory-scope-example[]
SessionFactory sessionFactory = new MetadataSources(new StandardServiceRegistryBuilder().build())
//end::events-interceptors-session-factory-scope-example[]
*/
//tag::events-interceptors-session-factory-scope-example[]
.addAnnotatedClass(Customer.class)
.getMetadataBuilder()
.build()