About Question enthuware.ocpjp.v21.2.3445 :
Moderator: admin
-
- Posts: 16
- Joined: Sat Nov 30, 2024 5:27 am
- Contact:
About Question enthuware.ocpjp.v21.2.3445 :
Hello, can you please clarify your example because it seems incomplete to me. In customer module-info, You said: note that abc.print module is not required. How will the customer module find an implementation for Print service if it doesn't require a module which implements one?
Online
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v21.2.3445 :
The module system and the Java service locator mechanism automatically make all available implementations of a service accessible to any module that says it requires that service. That's the whole point of declaring a service interface in a separate module. So that there is no direct dependency on the implementation module.
For details, please go through a good book such as Deshmukh's OCP 17 21 Fundamentals.
For details, please go through a good book such as Deshmukh's OCP 17 21 Fundamentals.
Who is online
Users browsing this forum: admin and 10 guests