Generated by GPT-5-mini| Jakarta JAX-RS | |
|---|---|
| Name | Jakarta JAX-RS |
| Othernames | JAX-RS, Jakarta RESTful Web Services |
| Developer | Eclipse Foundation |
| Released | 2008 |
| Latestrelease | 3.1.0 |
| Operating system | Cross-platform |
| Programming language | Java |
| License | Eclipse Public License |
Jakarta JAX-RS Jakarta JAX-RS is a specification for building RESTful web services in Java SE, Java EE, and Jakarta EE environments. It defines a programming model, annotations, and APIs used by implementations from projects such as Eclipse Jersey, Apache CXF, and RESTEasy to facilitate interaction with clients like curl (software), Postman (software), and browsers including Google Chrome and Mozilla Firefox. Jakarta JAX-RS integrates with servers and frameworks such as Apache Tomcat, Jetty (web server), WildFly, and GlassFish.
Jakarta JAX-RS standardizes how developers write RESTful endpoints for platforms like OpenJDK, Oracle JDK, and application servers such as IBM WebSphere and Red Hat JBoss EAP. The specification sits alongside related Jakarta specifications such as Jakarta Servlet, Jakarta CDI, and Jakarta JSON Binding to enable features consumed by tools including Maven, Gradle, and IDEs like Eclipse (software), IntelliJ IDEA, and NetBeans. Jakarta JAX-RS defines content negotiation with media types used by HTTP/1.1 and HTTP/2 clients and supports formats processed by libraries such as Jackson (software), Gson, and JSON-P.
Jakarta JAX-RS evolved from the original JSR process under the Java Community Process; early versions trace to work by vendors including Oracle Corporation, IBM, and Sun Microsystems. The reference implementation lineage includes GlassFish and later Eclipse Jersey following the move of Java EE to the Eclipse Foundation and the rebranding to Jakarta EE. Major milestones intersect with releases of Java SE 6, Java SE 8, and Jakarta EE platform releases, and community stewardship has involved organizations such as Red Hat, Fujitsu, and Payara. Changes in package namespace paralleled other transitions in projects like Jakarta Persistence and Jakarta RESTful Web Services during the Jakarta trademark and namespace migration.
Jakarta JAX-RS centers on resource classes, resource methods, providers, and runtime components that are delivered by implementations like Eclipse Jersey, Apache CXF, and RESTEasy. Resource classes are POJOs discovered by containers such as WildFly or by bootstrapped runtimes in Spring Framework integration projects. Core concepts include request routing similar to patterns in NGINX and HAProxy (software), response building compatible with HTTP/1.1 semantics, and exception mapping akin to handlers in Express.js. Providers for entity marshalling use frameworks such as Jackson (software), JSON-B, and JAXB; security integration often leverages OAuth 2.0, OpenID Connect, and server capabilities from Keycloak.
The specification prescribes declarative annotations applied to classes and methods, paralleling patterns found in Spring MVC and Play Framework. Common annotations map HTTP operations and media types to code and align with tools such as JUnit for testing and Mockito for mocking. The programming model supports injection with Jakarta CDI or vendor-specific support from Spring Framework and enables lifecycle control consistent with Servlet Container behavior in Apache Tomcat and Jetty (web server). Annotations guide routing, parameter extraction, and content negotiation used by clients including curl (software) and testing platforms like Postman (software).
Multiple implementations implement the Jakarta JAX-RS API: Eclipse Jersey as the reference implementation, Apache CXF for SOA and OSGi ecosystems, and RESTEasy for WildFly and Red Hat JBoss EAP users. Compatibility matrices reference Jakarta EE platform levels and JVM versions such as OpenJDK 8 and OpenJDK 11. Integration testing and conformance involve test suites and tools from organizations like the Eclipse Foundation and vendor ecosystems including Oracle Corporation and Red Hat.
Jakarta JAX-RS applications deploy to containers like GlassFish, WildFly, Apache Tomcat, and cloud platforms including Amazon Web Services, Microsoft Azure, and Google Cloud Platform. They integrate with build tools and CI/CD systems such as Jenkins, GitHub Actions, and GitLab CI, and monitoring stacks like Prometheus and Grafana. Security, scalability, and resilience are frequently addressed with components from Keycloak, service meshes like Istio, and load balancing proxies such as NGINX and Envoy (software).
A typical JAX-RS resource class follows the style used by Eclipse Jersey examples and patterns promoted by Oracle Corporation and Red Hat. Developers compile with Maven or Gradle and test with JUnit; runtime dependencies may include Jackson (software), JSON-B, and providers from Apache CXF or RESTEasy to marshal entities exchanged via HTTP/1.1 and HTTP/2. Example snippets and tutorials are found in vendor docs from Eclipse Foundation, Red Hat, and Oracle Corporation and in community posts on platforms like Stack Overflow and GitHub.