Which two methods can host the cache creation code?

A servlet class is injected with a JDBC data source. After injection has occurred, the servlet needs to create a cache out of some of the data in the database, so as to improve responsiveness.
Which two methods can host the cache creation code? (Choose two)
A. Servlet.init()
B. Servlet.destroy()
C. A method annotated with @Init
D. A method annotated with @PostConstruct
E. A method annotated with @PreDestroy
F. A method annotated with @Resource

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.