Jakarta Annotations (CA; formerly Common Annotations for the Java Platform or JSR 250) is a part of
Jakarta EE
Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web se ...
. Originally created with the objective to develop
Java annotation
In the Java computer programming language, an annotation is a form of syntactic metadata that can be added to Java source code. Classes, methods, variables, parameters and Java packages may be annotated. Like Javadoc tags, Java annotations ...
s (that is, information about a software program that is not part of the program itself) for common semantic concepts in the
Java SE
Java Platform, Standard Edition (Java SE) is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).
The platform uses J ...
and
Java EE
Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web se ...
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
The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. Anyone can become a JCP Member by filling a form available at thJCP we ...
, 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
Spring(s) may refer to:
Common uses
* Spring (season), a season of the year
* Spring (device), a mechanical device that stores energy
* Spring (hydrology), a natural source of water
* Spring (mathematics), a geometric surface in the shape of a h ...
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
Java Platform, Standard Edition (Java SE) is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).
The platform uses J ...
with version 6 (Generated, PostConstruct, PreDestroy, Resource, Resources). They are located in the packag
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
Jakarta AnnotationsJSR 250: Common Annotations for the Java Platform
{{Jakarta EE
Java specification requests
Java enterprise platform