About Question enthuware.ocpjp.ii.v11.2.3432 :
Moderator: admin
-
- Posts: 1
- Joined: Mon Jul 08, 2019 10:37 pm
- Contact:
About Question enthuware.ocpjp.ii.v11.2.3432 :
in explantion on first option its mentioned that Since database package is not used by any other module, there is no need to export it from the service module. but in question it stats Classes in the service package use classes from the dto and the database package .so databse package is used by service module
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
Yes, database package is used by the service module. But database is not a separate module. It is part of the service module itself and so, it can be accessed by other classes of the service module. There is no need to export database package from the service module because it is not used by any other module.
If you like our products and services, please help us by posting your review here.
-
- Posts: 62
- Joined: Fri Aug 07, 2015 2:16 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
My idea was to make databse an automatic module. That way it can be required by the service module. This is why I chekced answer 3.
What is wrong with my attempt?
What is wrong with my attempt?
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
Option 3 is incorrect because that would create 4 modules. The problem statement wants you to do it in three modules.
If you like our products and services, please help us by posting your review here.
-
- Posts: 62
- Joined: Fri Aug 07, 2015 2:16 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
module acme.provisioning.service {
exports com.acme.provisioning.service;
requires acme.provisioning.dto; }
why is the requires without "com."
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
No reason. One can name the module anything. It doesn't have to start with com.
If you like our products and services, please help us by posting your review here.
-
- Posts: 10
- Joined: Fri Nov 18, 2016 5:48 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
You said . But database is not a separate module. It is part of the service module itself and so
How do determine that, with this sentence ?
Classes in the database package use classes from the dto package.
because if module-info of database is
exports com.acme.provisioning.database
requires "DTO"
this option works as well
module acme.provisioning.service{
exports com.acme.provisioning.service;
requires com.acme.provisioning.database;
requires acme.provisioning.dto;
}
but if is this also
exports com.acme.provisioning.database
requires "DTO" transitive
you can
module acme.provisioning.service{
exports com.acme.provisioning.service; requires acme.provisioning.dto; }
How do determine that, with this sentence ?
Classes in the database package use classes from the dto package.
because if module-info of database is
exports com.acme.provisioning.database
requires "DTO"
this option works as well
module acme.provisioning.service{
exports com.acme.provisioning.service;
requires com.acme.provisioning.database;
requires acme.provisioning.dto;
}
but if is this also
exports com.acme.provisioning.database
requires "DTO" transitive
you can
module acme.provisioning.service{
exports com.acme.provisioning.service; requires acme.provisioning.dto; }
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
You determine that from the problem statement, which says, "You want to modularize the application into three modules - client, service, and dto."alfredo.zuloaga wrote: ↑Mon Apr 12, 2021 10:54 pmYou said . But database is not a separate module. It is part of the service module itself and so
How do determine that, with this sentence ?
Classes in the database package use classes from the dto package.
Therefore, it is clear that no module is expected for database classes.
If you like our products and services, please help us by posting your review here.
-
- Posts: 2
- Joined: Wed Aug 25, 2021 7:44 am
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
I'm not the OP, but it's still not clear to me. How do I determine that the database package is in the service module and not in client or dto module?
It makes sense to put it to the service module because the service package is the only one using the database package, but it could be in any module.
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
No, database classes cannot be in the client module because service classes don't depend on client, right? client classes depend on service.
Yes, database classes can be in the dto module but that possibility is not there among any of the options. So, only option 2 can be right.
Yes, database classes can be in the dto module but that possibility is not there among any of the options. So, only option 2 can be right.
If you like our products and services, please help us by posting your review here.
-
- Posts: 6
- Joined: Mon Sep 06, 2021 1:13 am
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
Was on the same path as user vts.vts. Would the exam misguide you similarly ?
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
There is no misguiding in this question. Please see the response above. Which part do you think is misguiding, please tell so that we can provide more clarification and improve the question.
If you like our products and services, please help us by posting your review here.
-
- Posts: 9
- Joined: Tue Sep 05, 2023 4:07 am
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
I didn't pick your answer, because I expected the correct answer to have "requires com.acme.provisioning.dto". So I thought it was a trick question since you wrote "requires acme.provisioning.dto;".
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
You are right. com. is missing. Fixed.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
-
- Posts: 12
- Joined: Sat Nov 30, 2024 5:27 am
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
Well, I think the modules names should be stated clearly to avoid confusion here because one could think that "requires com.acme.provisioning.dto" is wrong because "requires" statement is about module name, not package.
Given the name of the service module
Code: Select all
acme.provisioning.service
Code: Select all
acme.provisioning.dto, acme.provisioning.client
Code: Select all
acme.provisioning.xxx
-
- Site Admin
- Posts: 10329
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.3432 :
You are right. The question has now been updated to explicitly mention the module names.
thank you for your feedback!
Happy to know that you find our material helpful.
thank you for your feedback!
Happy to know that you find our material helpful.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 13 guests