2017年11月30日 星期四

QUESTION 79

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


Correct Answer: AD

沒有留言:

張貼留言