About Question enthuware.oce-jpad.v6.-2.-451 :
Moderator: admin
-
- Posts: 7
- Joined: Tue Sep 04, 2018 9:51 am
- Contact:
About Question enthuware.oce-jpad.v6.-2.-451 :
Question 13:
"Given that the persistence provider supports caching and shared-cache-mode is set to DISABLE_SELECTIVE, which of the entities will be removed from the cache when the following code is executed?"
c.evict(Account.class);
I answered "all", because of including subclasses of Account.
This is also according to the explanation:
"Cache.evict(class) applies to all the entities of the given class and its subclasses. Thus, in the case all instance of Account, CheckingAccount and SavingsAccount will be evicted."
WHY is the correct answer (by me) stated incorrectly, being only Account to be evicted???
"Given that the persistence provider supports caching and shared-cache-mode is set to DISABLE_SELECTIVE, which of the entities will be removed from the cache when the following code is executed?"
c.evict(Account.class);
I answered "all", because of including subclasses of Account.
This is also according to the explanation:
"Cache.evict(class) applies to all the entities of the given class and its subclasses. Thus, in the case all instance of Account, CheckingAccount and SavingsAccount will be evicted."
WHY is the correct answer (by me) stated incorrectly, being only Account to be evicted???
Last edited by admin on Wed Sep 05, 2018 1:35 am, edited 1 time in total.
Reason: updated qid in subject so that this thread is ignored in the search result
Reason: updated qid in subject so that this thread is ignored in the search result
-
- Site Admin
- Posts: 10068
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
I see that option 2 (All Account, CheckingAccount, and SavingsAccount entities) is marked as the correct option. Could you please confirm you selected option 2 and that evaluated as incorrect?
If you like our products and services, please help us by posting your review here.
-
- Posts: 7
- Joined: Tue Sep 04, 2018 9:51 am
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
Yes, I confirm that option 2 is marked as incorrect, while 1 is marked as the correct one.
I have Enthuware Test Studio v3.93 Build : 20180516
I have question bank version 1/71 of jpapv6.etc.
It concerns test 1 question 13.
The complete text is:
Consider the following entity class hierarchy:
@Entity
public class Account{ ... }
@Entity
@Cacheable(true)
public class CheckingAccount extends Account{ ... }
@Entity
public class SavingsAccount extends Account{ ... }
Given that the persistence provider supports caching and shared-cache-mode is set to DISABLE_SELECTIVE, which of the entities will be removed from the cache when the following code is executed?
Cache c = ...//get a reference to Cache somehow
c.evict(Account.class);
Assume that there is no other caching related meta data specified for the given entities.
1=Only Account entities
2=All Accounts, CheckingAccount, and SavingAccount entities.
3=etc.
4=etc.
I answered 2, but it says
"You answered incorrectly
You had to select option 1"
Explanation
Note that when share-cached-mode is set to DISABLE_SELECTIVE, all the entities are cached except the ones for which @Cacheable(false) is specified. Cache.evict(class) applies to all the entities of the given class and its subclasses. Thus, in the case all instance of Account, CheckingAccount and SavingsAccount will be evicted.
So the explanation is according to answer 2, but this is counted wrong in my case.
I have Enthuware Test Studio v3.93 Build : 20180516
I have question bank version 1/71 of jpapv6.etc.
It concerns test 1 question 13.
The complete text is:
Consider the following entity class hierarchy:
@Entity
public class Account{ ... }
@Entity
@Cacheable(true)
public class CheckingAccount extends Account{ ... }
@Entity
public class SavingsAccount extends Account{ ... }
Given that the persistence provider supports caching and shared-cache-mode is set to DISABLE_SELECTIVE, which of the entities will be removed from the cache when the following code is executed?
Cache c = ...//get a reference to Cache somehow
c.evict(Account.class);
Assume that there is no other caching related meta data specified for the given entities.
1=Only Account entities
2=All Accounts, CheckingAccount, and SavingAccount entities.
3=etc.
4=etc.
I answered 2, but it says
"You answered incorrectly
You had to select option 1"
Explanation
Note that when share-cached-mode is set to DISABLE_SELECTIVE, all the entities are cached except the ones for which @Cacheable(false) is specified. Cache.evict(class) applies to all the entities of the given class and its subclasses. Thus, in the case all instance of Account, CheckingAccount and SavingsAccount will be evicted.
So the explanation is according to answer 2, but this is counted wrong in my case.
-
- Site Admin
- Posts: 10068
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
OK, please zip up your workfolder and email it to support emailid ( support@enthu... ) so that I can investigate this. I am checking the same version and it shows me that option 2 is set as the correct option. A screenshot of what you see will also be helpful.
If you like our products and services, please help us by posting your review here.
-
- Posts: 7
- Joined: Tue Sep 04, 2018 9:51 am
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
I have sent a screenshot and the workfolder via mail.
I hope you can find the issue with my question bank.
I got 75% on test 1, should be somewhat higher though.
And I hope other questions were treated right.
Thanks for your investigation.
I hope you can find the issue with my question bank.
I got 75% on test 1, should be somewhat higher though.
And I hope other questions were treated right.
Thanks for your investigation.
-
- Site Admin
- Posts: 10068
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
Replied to your email. The screenshot shows that the question was evaluated correctly and as expected.
If you like our products and services, please help us by posting your review here.
-
- Posts: 7
- Joined: Tue Sep 04, 2018 9:51 am
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.451 :
Sorry, my bad
Edit: This topic may be deleted completely, because it makes no sense to link to this discussion from within the test studio.
Edit: This topic may be deleted completely, because it makes no sense to link to this discussion from within the test studio.
Who is online
Users browsing this forum: No registered users and 77 guests