From f4506a4fd9679d5e82a53217de4138082f495a60 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 8 Sep 2011 16:51:28 -0500 Subject: [PATCH] HHH-6641 - Document services --- .../main/docbook/devguide/en-US/Services.xml | 75 +++++++++---------- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/documentation/src/main/docbook/devguide/en-US/Services.xml b/documentation/src/main/docbook/devguide/en-US/Services.xml index 640b09e964..574211d762 100644 --- a/documentation/src/main/docbook/devguide/en-US/Services.xml +++ b/documentation/src/main/docbook/devguide/en-US/Services.xml @@ -50,35 +50,8 @@ ServiceRegistryBuilder Building a org.hibernate.service.ServiceRegistry is the purpose of the - org.hibernate.service.ServiceRegistryBuilder. Once a - org.hibernate.service.ServiceRegistry is built, the service it contains - are immutable (the services themselves might accept re-configuration, but immutable here means - adding/replacing services). So another role provided by the - org.hibernate.service.ServiceRegistryBuilder is to allow tweaking of the services - that will be contained in the org.hibernate.service.ServiceRegistry - generated from it. + org.hibernate.service.ServiceRegistryBuilder. - - There are 2 means to tell a org.hibernate.service.ServiceRegistryBuilder about - custom services. - - - - - Implement a org.hibernate.service.spi.BasicServiceInitiator class - to control on-demand construction of the service class and add it to the - org.hibernate.service.ServiceRegistryBuilder via its - addInitiator method. - - - - - Just instantiate the service class and add it to the - org.hibernate.service.ServiceRegistryBuilder via its - addService method. - - -
@@ -111,19 +84,39 @@
Custom services -
- Extending services - - Adding additional services can be achieved by ... - -
- -
- Overriding services - - Services can be overridden by ... - -
+ + Once a org.hibernate.service.ServiceRegistry is built it is considered + immutable; the services themselves might accept re-configuration, but immutability here means + adding/replacing services. So another role provided by the + org.hibernate.service.ServiceRegistryBuilder is to allow tweaking of the services + that will be contained in the org.hibernate.service.ServiceRegistry + generated from it. + + + There are 2 means to tell a org.hibernate.service.ServiceRegistryBuilder about + custom services. + + + + + Implement a org.hibernate.service.spi.BasicServiceInitiator class + to control on-demand construction of the service class and add it to the + org.hibernate.service.ServiceRegistryBuilder via its + addInitiator method. + + + + + Just instantiate the service class and add it to the + org.hibernate.service.ServiceRegistryBuilder via its + addService method. + + + + + Either approach the adding a service approach or the adding an initiator approach are valid for extending a + registry (adding new service roles) and overriding services (replacing service implementations). +