Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware Exam 2V0-72.22 Topic 11 Question 26 Discussion

Actual exam question for VMware's 2V0-72.22 exam
Question #: 26
Topic #: 11
[All 2V0-72.22 Questions]

Which is the correct approach to register for a bean destruction callback?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Lou
1 months ago
I'd like to register a bean destruction callback for my sense of humor. It seems to be self-destructing after reading these answer choices.
upvoted 0 times
Cassie
7 days ago
C) Add the @Lazy annotation to the bean configuration.
upvoted 0 times
...
Cortney
12 days ago
B) Annotate the callback method with @PreDestroy.
upvoted 0 times
...
Alease
13 days ago
A) Annotate the callback method with @PostDestroy.
upvoted 0 times
...
...
Sharee
2 months ago
D) Prototype scope? What does that have to do with bean destruction callbacks? Clearly, I need to review my Spring annotations.
upvoted 0 times
...
Antonette
2 months ago
C) @Lazy? Really? That's not related to bean destruction at all. Gotta be more careful with these tricky options.
upvoted 0 times
Felicidad
1 months ago
D) Configure the bean instance to use prototype scope.
upvoted 0 times
...
Rosenda
1 months ago
B) Annotate the callback method with @PreDestroy.
upvoted 0 times
...
Precious
1 months ago
A) Annotate the callback method with @PostDestroy.
upvoted 0 times
...
...
Dierdre
2 months ago
Hmm, I was wondering if @PostDestroy would work, but you're right, @PreDestroy is the way to go. Thanks for the clarification!
upvoted 0 times
Sharen
19 days ago
Hmm, I was wondering if @PostDestroy would work, but you're right, @PreDestroy is the way to go. Thanks for the clarification!
upvoted 0 times
...
Alesia
21 days ago
B) Annotate the callback method with @PreDestroy.
upvoted 0 times
...
Cyndy
27 days ago
A) Annotate the callback method with @PreDestroy.
upvoted 0 times
...
...
Tenesha
2 months ago
B) Annotate the callback method with @PreDestroy. That's the correct way to register a bean destruction callback.
upvoted 0 times
Maynard
2 months ago
A) Annotate the callback method with @PostDestroy.
upvoted 0 times
...
Derick
2 months ago
B) Annotate the callback method with @PreDestroy.
upvoted 0 times
...
...
Jeannine
2 months ago
But doesn't @PreDestroy ensure that the callback method is called before the bean is destroyed?
upvoted 0 times
...
Glen
3 months ago
I disagree, I believe the correct approach is to configure the bean instance to use prototype scope.
upvoted 0 times
...
Jeannine
3 months ago
I think the correct approach is to annotate the callback method with @PreDestroy.
upvoted 0 times
...

Save Cancel