What is J2EE?

The full name of J2EE is Java 2 Platform Enterprise Edition. It is an industry standard developed and widely recognized by various companies jointly led by SUN. Or, it is an enterprise-level distribution under the leadership of SUN. Application development specifications. At present, J2EE is the mainstream enterprise-level distributed application platform solution in the market [1] .

The creation of Servlet technology in 1997 and the subsequent generation of JSP brought chips to Java against server-side languages such as PHP and ASP. In 1998, Sun released the EJBI.0 standard. So far, the three core technologies of the J2EE platform have appeared. Therefore, in 1999, Sun officially released the first version of J2EE, and J2EE1.2 was released at the end of 1999, J2EEl.3 was released in 2001, and J2EE1.4 was released at the end of 2003.
(1) J2EE1.3
The following is the architecture diagram of J2EE1.3, which mainly contains Applet container, Application Client container, Web container and EJB container, and contains Web Component, EJB Component, Application Client Com-
ponent, based on JMS, JAAS, JAXP, JDBC, JAF, JavaMail, JTA and other technologies.
Several notable features were introduced in J2EE 1.3: Java Message Service (which defines a set of APIs for JMS), J2EE Connector Technology (which defines the standard for extending J2EE services to non-J2EE applications), and an Groups of Java APl, Servlet2.3, JSPl.2 have also been extended and optimized for performance, a new CMP component model and MDB (message bean).
(2) J2EE1.4
The general framework of J2EE1.4 is consistent with J2EE1.3. J2EE1.4 added support for Web services, mainly Web Services, JAX-RPC, SAAJ, JAXR, and also improved the EJB message passing mechanism EJB2.1), enhanced deployment and management tools (JMX), and new versions of Servlet2.4 and JSP2.0 make Web applications easier [3]
J2EE itself is a standard, not a ready-made product (although there are many J2EE-compliant products today), it consists of the following parts:
(1) J2EE specification. The specification defines the architecture of the J2EE platform, the role of the platform, and the implementation requirements for each service and core API in J2EE. It is an outline for J2EE application server developers.
(2) J2EE compatibility test site. A site provided by Sun to test whether a J2EE application server complies with the J2EE specification. For products that pass this site, Sun will issue a compatibility certificate.
(3) J2EE reference implementation. That is, J2EESDK, which is not only a non-commercial implementation of the J2EE specification by Sun itself, but also a free underlying development environment for the development of J2EE-based enterprise application system prototypes.
(4) J2EE implementation guidelines. The BluePrints document, this document guides developers how to develop a J2EE-based multi-tier enterprise application system through examples. [2]
J2EE provides a good mechanism for building enterprise systems that are scalable, flexible, and easy to maintain.
1. Support heterogeneous environment
J2EE can develop portable programs that are deployed in heterogeneous environments. no matter how
J2EE's architecture can be divided into four layers, as shown in Figure 1
J2EE applications are composed of components. J2EE components are software units with independent functions. They are assembled into J2EE applications through related classes and files, and interact with other components. The J2EE specification defines the following J2EE components:
(1) Client layer components, including client applications and Applets;
(2) Web layer components, including Java Servlet and Java Server Pages (JSP);
(3) Business layer components, that is, Enterprise JavaBeans (EJB).
Client layer components
J2EE applications can be web-based or traditional.
Web-tier components: J2EE Web-tier components can be JSP pages or servlets. According to the J2EE specification, neither static HTML pages nor Applets are Web-tier components. The Web layer may contain certain JavaBean objects to process user input and send the input to the enterprise bean running on the business layer for processing.
2. Business layer components
The code logic of the business layer is used to meet the needs of special business areas such as banking, retail, and finance, and is handled by the enterprise bean running on the business layer.
There are three types of enterprise beans: session beans, entity beans, and message-driven beans. A session bean represents a temporary interaction with a client program. When the client program finishes executing, the session bean and related data disappear. In contrast, an entity bean represents a row of permanent records in a database table. When the client program is terminated or the server is shut down, there are potential system services to ensure that the entity bean data is saved. A message-driven bean combines the characteristics of a session bean and a JMS message listener, allowing a business layer component to receive JMS messages asynchronously.
3. Enterprise Information System Layer
The enterprise information system layer processes enterprise information system software, including enterprise infrastructure systems, such as enterprise resource planning (ERP), mainframe transaction processing, database systems, and other legacy information systems. For example, J2EE application components may need to access enterprise information systems for database connection [4]
The J2EE platform consists of a complete set of services, application programming interfaces (APIs), and protocols. It provides functional support for the development of Web-based multi-layer applications. The following briefly describes the main technical specifications in J2EE.
1.JDBC (Java Database Connectivity)
JDBCAPI provides a unified way to access different databases. Like ODBC, JDBC shields some details from developers. In addition, JDBC access to the database is also platform-independent.
2. JNDI (Java Name and Directory Interface)
JNDIAPI is used to perform name and directory services. It provides a consistent model for accessing and manipulating enterprise-level resources, such as DNS and LDAP, local file systems, and objects in application servers.
3.EJB (Enterprise JavaBean)
EJB technology is a component technology for server-side distributed applications developed on the basis of Java Bean local component technology. EJB is part of the J2EE specification introduced by Sun. Since the introduction of J2EE, it has been widely developed and has become a standard technology on the application server side. JB provides a framework for developing and implementing distributed business logic, which greatly simplifies the development of scalable and highly complex enterprise-level applications. The EJB specification defines how EJB components interact with EJB containers. Containers are responsible for providing common services such as directory services, transaction management, security, resource buffer pools, and fault tolerance. But EJB is not the only way to implement J2EE. Because of the openness of J2EE, some vendors can achieve the same goal in a way parallel to EJB.
EJB is based on the Java language and provides a way to reuse Java binary byte code. The introduction of EJB technology makes it possible to develop server-side distributed applications using Java-based component technology. From the perspective of enterprise application multi-layer structure, EJB is a middleware technology of business logic layer. The key difference from JavaBeans is that it provides transaction processing capabilities.
4.JSP (Java Server Pages)
A JSP page consists of HTML code and Java code embedded in it. The server processes the Java code in the page after the page is requested by the client, and then returns the generated HTML page to the client's browser.
5.Java Servlet Servlet is a small Java program that extends the capabilities of a Web server.
As a server-side application, similar to a CGI script, it starts executing when requested. Servlet provides similar functions to JSP, but the implementation is different. JSP usually embeds a small amount of Java code in a large amount of HTML code, while servlets are all written in Java and generate HTML.
6.RMI / IIOP
RMI (Remote Method Invocation) is a distributed object standard for Java that allows communication between Java classes located on different hosts. Java RMI is an application programming interface (API) or a distributed object model; using RMI, Java programmers can make network calls as if they were local operations, which makes it easy to construct distributed systems. The IIOP protocol was originally a transport protocol of CORBA, which combined with RMI makes it easier to integrate non-Java objects.
7.Java IDL / CORBA
With the support of Java IDL, developers can integrate Java and CORBA together. They can create Java objects and deploy them in CORBAORB, or create Java classes as clients of CORBA objects deployed with other ORBs. The latter can be used for integration of legacy systems.
8.XML (Extensible Markup Language)
XML is a language that can be used to define other markup languages. It is used to share data in different business processes. The development of XML and Java are independent of each other, but the same goal that it has with Java is platform independence. The combination of Java and XML constitutes a perfect platform-independent solution.
9.JavaMail
JavaMail is an API for accessing the mail server. It provides a set of abstract classes for the mail server. JavaMail supports both SMTP and IMAP servers.
10.JAF (JavaBeans Activation Framework, JavaBeans Activation Framework)
JavaMail uses JAF to handle MIME-encoded email attachments. MIME byte streams can be converted to or from Java objects. Most applications do not need to use JAF directly.
11. JMS (Java Message Service)
JMS is an application program interface (API) for communicating with message-oriented middleware. It supports both point-to-point domains and publish / subscribe domains, and provides support for the following types: approved messaging, transactional messaging, consistent messaging, and durable subscriptions Support. JMS also provides a way to integrate with legacy back-end systems.
12. JTA (Java Transaction Architecture)
JTA defines a standard API so that application systems can access various transaction monitoring.
13. JTS (Java Transaction Service, Java Transaction Service)
JTS is the basic implementation of CORBAOTS transaction monitoring. JTS specifies the implementation of the transaction manager. The transaction manager supports the Java Transaction API (JTA) specification at a high level and implements the Java image of the OMGOTS specification at the bottom of the system. JTS transaction manager provides transaction services for application servers, resource managers, independent applications, and communication resource managers [4] .

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?