GO-V.ORG
As seen in

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 services. Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying. Jakarta EE is defined by its specification. The specification defines APIs (application programming interface) and their interactions. As with other Java Community Process specifications, providers must meet certain conformance... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

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 services. Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying. Jakarta EE is defined by its specification. The specification defines APIs (application programming interface) and their interactions. As with other Java Community Process specifications, providers must meet certain conformance requirements in order to declare their products as Jakarta EE compliant. Examples of contexts in which Jakarta EE referencing runtimes are used are: e-commerce, accounting, banking information systems. ==Code sample== The code sample shown below demonstrates how various technologies in Java EE 7 are used together to build a web form for editing a user. In Jakarta EE a (web) UI can be built using Jakarta Servlet, Jakarta Server Pages (JSP), or Jakarta Faces (JSF) with Facelets. The example below uses Faces and Facelets. Not explicitly shown is that the input components use the Jakarta EE Bean Validation API under the covers to validate constraints. To assist the view, Jakarta EE uses a concept called a "Backing Bean". The example below uses Contexts and Dependency Injection (CDI) and Jakarta Enterprise Beans (EJB). package org.wikipedia.examples; import java.io.Serializable; import jakarta.faces.view.ViewScoped; import jakarta.inject.Inject; import jakarta.inject.Named; @Named @ViewScoped public class UserEdit implements Serializable { private static final long serialVersionUID = 1L; private User user; @Inject private UserDAO userDAO; public String saveUser() { userDAO.save(this.user); addFlashMessage(String.format("User %d saved", this.user.getId())); return "users.xhtml?faces-redirect=true"; } public void setUser(User user) { this.user = user; } public User getUser() { return user; } } ===Example Data Access Object class=== To implement business logic, Jakarta Enterprise Beans (EJB) is the dedicated technology in Jakarta EE. For the actual persistence, JDBC or Jakarta Persistence (JPA) can be used. The example below uses EJB and JPA. Not explicitly shown is that JTA is used under the covers by EJB to control transactional behavior. package org.wikipedia.examples; import java.util.List; import jakarta.ejb.Stateless; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import jakarta.persistence.TypedQuery; @Stateless public class UserDAO { @PersistenceContext private EntityManager entityManager; public void save(User user) { entityManager.persist(user); } public void update(User user) { entityManager.merge(user); } public List getAll() { return entityManager.createNamedQuery("User.getAll", User.class) .getResultList(); } } ===Example Entity class=== For defining entity/model classes Jakarta EE provides the Jakarta Persistence (JPA), and for expressing constraints on those entities it provides the Bean Validation API. The example below uses both these technologies. package org.wikipedia.examples; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; @Entity public class User { @Id @GeneratedValue(strategy = IDENTITY) private Integer id; @Size(min = 2, message="First name too short") private String firstName; @Size(min = 2, message="Last name too short") private String lastName; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } ==External links== Jakarta EE Compatible Products: Enterprise Java Application and Web Servers - Eclipse Foundation The Official Jakarta EE Tutorial First Cup of Jakarta EE Tutorial: An Introduction to Jakarta EE Jakarta EE Specification Guide - Jakarta EE Platform Jakarta EE Official Starter: Generate a Jakarta EE Project Java Platform, Enterprise Edition (Java EE), Oracle Technology Network Jakarta EE official YouTube channel

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Jakarta EE". 1780092560. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1356814377

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·