Contributors:
- Max Arruda
- Michael Redlich
- Otávio Santana
The Jakarta Data specification provides an API that allows easy access to database technologies. It can split the persistence from the model with several features, such as the ability to compose custom query methods on a Repository
interface where the framework will implement it.
The Jakarta NoSQL specification defines a set of APIs to provide a standard implementation for most NoSQL databases. Jakarta NoSQL is considered "one API for many NoSQL databases" as it supports the four types of NoSQL databases: column family, document, graph and key-value.
This Jakarta Data, Jakarta NoSQL and MongoDB application that accompanies the presentation, Jakarta EE 11: Going Beyond the Era of Java EE to demonstrate how to get started building a MongoDB database application with the Jakarta Data and Jakarta NoSQL specifications.
One of the 42 specifications in the Jakarta EE ecosystem that supports all four types of NoSQL databases: column family, document, graph and key-value.
The compatible implementation of Jakarta NoSQL.
MongoDB is a free and open-source cross-platform document-oriented database. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.
To run this project a MongoDB instance is required, so you can use either a local installation or Docker.
Follow the instructions in the installation guide.
- Install docker: https://www.docker.com/
- https://store.docker.com/images/mongo
- Run docker command
- Run MongoDB: verify MongoDB image name with the command
docker images
, it can be mongodb or mongo, and then execute this command:docker run -d --name mongodb-instance -p 27017:27017 mongo
git clone https://github.com/mpredli01/jakarta-data-beers.git
mvn clean compile package
java -jar payara-micro-6.2024.1.jar /usr/local/apps/jakartaee-apps/jakarta-data-beers/target/beers.war
curl -X POST -H "Content-Type: application/json" -d '{"_id": 3, "name": "Russian Imperial Stout", "type": "STOUT", "brewer_id": 1, "abv": 10.2}' http://10.0.0.229:8080/beers/db/beer/3
curl -X POST -H "Content-Type: application/json" -d '{"_id": 3, "name": "Maine Beer Compnay", "city": "Freeport", "state": "Maine" }' http://10.0.0.229:8080/beers/db/brewer/{id}
curl -X DELETE -H http://10.0.0.229:8080/beers/db/beer/{id}
curl -X DELETE -H http://10.0.0.229:8080/beers/db/brewer/{id}
- Jakarta Data specification
- Jakarta NoSQL specification
- JNoSQL website