Multiple choice technology architecture

You have defined transaction attributes for a particular method in the session bean class through annotations. You defined a different value in the deployment descriptor. If you have defined at both the places for a particular method, which settings take precedence?

  1. Annotations

  2. Deployment descriptor

  3. This is not possible as you cannot use both.

  4. It is specific to application server product

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

In EJB, deployment descriptor settings always override annotation configurations for the same method. The deployment descriptor provides externalized configuration that takes precedence, allowing administrators to modify behavior without changing code. This design pattern enables separation of development and operational concerns.