The whole purpose of supporting the concept of "Provided Services" is to not manage their lifecycle. This is for use cases where Hibernate Search (engine) is reused in the context of other frameworks.
Then we maybe need something else as well. As said, we need to discuss this.
I'm not sure I understand. Could you make a practical example?
HibernateSessionFactoryService, MessageSenderService and NodeSelectorService. These services are configured via the ServiceLoader even though we are not going to allow multiple service implementations. We want services, because we need the life cycle part. Really these services should be provided programmatically by us. That's why I want to discuss how internal services are supposed to work. Maybe we need something like an integrator "service" as well. Similar to ORM. The integrator service would allow for example the JGroups module to register/provide additional services. Does that make more sense?
|