jakarta-eeannotationsejb-3.0deployment-descriptor

Ejb deployment descriptor and annotations


Say if have configuration in both deployment descriptor and annotations which one will be effective. Will annotations override the deployment descriptor.


Solution

  • Deployment Descriptors override Annotations. Here is an excerpt from the Java EE Tutorial.

    Deployment information is most commonly specified in the source code by annotations. Deployment descriptors, if present, override what is specified in the source code.

    5.1 Packaging Applications