Multiple choice technology architecture

You would like to measure the performance (response time) of a particular business method of EJB3.0 Session Bean. Which of the following facilitates the same?

  1. Dependency Injection

  2. Interceptors

  3. Intercepting Filter Pattern

  4. None of the above. You need to write code for measuring response times.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

EJB 3.0 Interceptors (@AroundInvoke) provide cross-cutting concerns like performance measurement without modifying business logic. An interceptor method can record start/end timestamps around the business method execution. Dependency injection is for resource injection, not timing.