Jakarta Annotations

Jakarta Annotations (CA; formerly Common Annotations for the Java Platform or JSR 250) is a part of Jakarta EE. Originally created with the objective to develop Java annotations (that is, information about a software program that is not part of the program itself) for common semantic concepts in the Java SE and Java EE platforms that apply across a variety of individual technologies. It was envisioned that various JSRs would use annotations to enable a declarative style of programming. It would be especially valuable to have consistency within the Java EE component JSRs, but it is also valuable to allow consistency between Java EE and Java SE.

Description and purpose

JSR 250, as a Java Specification Request, has the objective to define a set of annotations that address common semantic concepts and therefore can be used by many Java EE and Java SE components. This is to avoid redundant annotations across those components. JSR 250 was released on 11 May 2006. As Declarative annotation-driven configuration is more and more used in Java frameworks and applications, e.g. Spring makes more components of its framework configurable via annotations, the importance of JSR 250 is likely to increase in the future.

Dependencies to other JSRs

JSR 250 depends on JSR 175 and therefore also on Java SE 5.0

The annotations

Implementation

All non-Java EE JSR 250 annotations were added to the Java SE with version 6 (Generated, PostConstruct, PreDestroy, Resource, Resources). They are located in the package javax.annotation. They were subsequently deprecated in Java SE 9 and removed in Java SE 11, however, they are effectively continued, being renamed to jakarta.annotation in Jakarta EE 9.

References

Uses material from the Wikipedia article Jakarta Annotations, released under the CC BY-SA 4.0 license.