Java's gorgeous Turn-a brief introduction to the J2EE 13th Standard

Source: Internet
Author: User

The foundation of J2EE technology is the Java 2 platform. It not only has all the functions of the J2SE platform, but also provides comprehensive support for EJB, Servlet, JSP, XML, and other technologies, at the same time, J2EE also has the characteristics of one-time compilation and running everywhere, with great flexibility.

The following describes the features of the thirteen J2EE standards.

 

1. JDBC (Java Database Connectivity): Java Database Connection

JDBC looks like it is easy to think of ODBC. If you have learned ODBC, you will feel that JDBC and ODBC are used for database connection. By using JDBC, developers can easily send SQL statements to almost any database without writing various programs to connect to different databases. ODBC needs to connect to different databases.

 

2. JNDI (Java Naming and DirectoryInterfaces): Java Naming and directory Interfaces

 

Associate an identifier with a resource. JNDI is a search service mainly used for searching.

It is used to find the Web application environment variables, EJBs and their environment variables, through the DataSources database connection pool, JMS targets and connection factories.

JNDI can be used in EJB, RMI-IIOP, and JDBC. It is a standard method for searching and locating networks.

 

3. EJB (Enterprise JavaBeans): Java Enterprise Bean

 

EJB is the core code of Java, including Session Bean, Entity Bean, and MessageDrivenBean)

 

Session Bean indicates temporary interaction with the client program. After the client program is executed, the Session Bean and related data will disappear.

The Entity Bean indicates a permanent record in a table in the database. When the client program is terminated or the server is shut down, there will be potential services to ensure that the data of the entity Bean can be saved.

The message-driven Bean combines the characteristics of the Session Bean and the message listener of JMS, allowing a service layer component to receive JMS messages asynchronously.

In this case, EJB is actually a collection of business logic, entities, and database operations.

 

4. RMI (Remote MethodInvocation): Remote method call

Because J2EE is a distributed program platform, it uses the RMI mechanism to implement communication between program components in different operating systems. For example, an EJB can call the EJB Remote Method on another machine on the Web through RMI.

RMI can also use standard JDBC packages to connect to existing relational databases.

 

5. JavaIDL/CORBA: Java Interface Definition Language/Public Object Request proxy Architecture

 

Java IDL enables interaction between objects on different platforms on the network. This technology provides a description of the CORBA specification. IDL is an interface definition language that does not depend on a language. All languages that support CORBA have the IDL ing of IDL to this language.

 

6. JSP (Java ServerPages)

JSP is a technology that implements mixed encoding of common static HTML and dynamic page output. From this point of view, it seems very similar to ASP, PHP and other technologies. With the separation of formal content and appearance, Web page creation tasks can be easily divided into page designers and programmers, and can be easily synthesized through JSP.

 

7. Servlet

 

Most of the functions provided by servlets are the same as those provided by JSP. It uses a slightly different method. The majority of JSP code is HTML code, with only a small amount of Java code, while servlets is the opposite. It is completely written in Java and generates HTML code. From the perspective of three layers, Servlet is very powerful for writing business layers, and it is very inconvenient for Writing Performance layers. JSp is mainly designed to facilitate Writing Performance layers.

 

8. XML (Extended Markup Language)

 

XML is clearly designed to solve the data exchange problem-it is actually based on a DTD or schema recognized by both parties and exchanged message loads in XML format.

XML provides cross-platform compatibility, which supplements the rapid portability of Java. Through the combination of Java and XML, we can get a perfect solution with platform independence.

 

9. JMS (JavaMessageService): Java Message Service

 

JMS provides a common method to create, send, receive, and read messages from the enterprise message communication system.

 

 

10. JTA (Java TransactionAPI): Java transaction API

 

JTA is used to communicate with transaction services. It provides standard Java APIs for starting transactions, connecting existing transactions, committing transactions, and revoking transactions.

JTA defines a standard API through which the application can access the transaction monitor.

 

 

11. JTS (Java Transaction Service): Java Transaction Service

JTS is a basic implementation of the corba ots transaction monitor. JTS specifies a Transaction Manager implementation (Transaction Manager), which supports Java Transaction API (JTA) specifications at a high level, in addition, Java ing of omg ots specifications is implemented at a low level. A jts Transaction Manager provides transaction services for the application server, resource manager, standalone application, and Communication Resource Manager.

 

12. JavaMail

JavaMail is an API used to access the mail server. It provides an abstract class for the mail server. Not only supports AMTP servers, but also supports IMAP servers.

 

13. JAF (JavaBeans Activation Framework): Activity bedframe of JavaBeans

 

JavaMail uses JAF to process MIME-encoded email attachments. MIME byte streams can be converted to Java objects or to Java objects. Most applications do not need to use JAF directly.

 

The thirteen specifications are mapped to the J2EE architecture as follows:


Let's take a look at the figure above and put it in three layers. In JSP, Servlet is the presentation layer, and EJB is the business logic layer and DAL layer ., Since the three-layer structure, EJB has become the core of the business logic layer. It is mapped to MVC. JSP is the view, Servlet is the controller, and EJB is the Model layer.

Next, let's take a look at the figure below, which shows the relationship between MVC and the three layers, so that we can start from the three layers we are familiar with and go through to understand the functions of JSP, Servlet, and EJB.


 

J2EE is a standard to be implemented, such as Jboss, Weblogic, and websphere. Since it is called a standard, we should follow this standard to get farther and farther.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.