13 Core technologies for sharing Java EE _java

Source: Internet
Author: User
Tags perl script

Java was originally staged in browsers and client machines. At the time, many people questioned whether it was suitable for server-side development. Now, with the increase in Third-party support for the JAVA2 platform Enterprise version, Java is widely accepted as one of the preferred platforms for developing enterprise server-side solutions.

In this article I will explain 13 core technologies that support Java EE: JDBC, JNDI, EJBs, RMI, JSP, Java servlets, XML, JMS, Java IDL, JTS, JTA, JavaMail, and JAF.

The Java EE platform consists of a suite of service (services), application interfaces (APIs), and protocols that provide functional support for the development of web-based multi-tier applications.

First, JDBC (Java Database connectivity)

The JDBC API provides a unified approach to accessing different databases, like ODBC, where JDBC masks some of the details of the developer, and JDBC access to the database is also platform-independent.

Second, JNDI (Java Name and Directory Interface)

The JNDI API is used to perform name and directory services. It provides a consistent model for accessing and manipulating enterprise-class resources such as DNS and LDAP, local file systems, or objects in the application server.

Iii. EJB (Enterprise JavaBean)

One of the reasons why Java-EE technology has gained widespread attention in the media is EJB. They provide a framework for developing and implementing distributed business logic, thereby significantly simplifying the development of scalable and highly complex enterprise-class applications. The EJB specification defines when and how EJB components interact with their containers. The container is responsible for providing common services such as directory services, transaction management, security, resource buffer pooling, and fault tolerance. But it's worth noting that EJB is not the only way to achieve Java EE. It is because of the openness of Java EE that some vendors can achieve the same goal in a way that is parallel to EJB.

Iv. RMI (Remote method Invoke)

Invokes a method on the remote object. It uses serialization to pass data on both the client and server side. RMI is a more low-level protocol that is used by EJBS.

Five, Java Idl/corba

With the support of Java IDL, developers can integrate Java with CORBA. They can create Java objects and enable them to expand in a CORBA orb, or they can create Java classes and serve as customers for CORBA objects that are expanded with other orb. The latter approach provides another way through which Java can be used to integrate your new application with the old system.

Six, JSP (Java Server Pages)

JSP pages are made up of HTML code and embedded Java code. The server processes the Java code after the page is requested by the client, and then returns the resulting HTML page to the client's browser.

Seven, Java Servlet

A servlet is a small Java program that expands the functionality of a Web server. As a server-side application, it is similar to a CGI Perl script to start executing when requested. Most of the functionality provided by the servlet is similar to the JSP, but it is implemented in a different way. JSP is typically a small amount of Java code embedded in most HTML code, while Servlets is written in Java and generates HTML.

Viii. 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 it is the same goal with Java is platform independence. By combining Java and XML, you can get a perfect platform-independent solution.

Ix. JMS (Java message Service)

JMS is an application interface (API) for communicating with message-oriented middleware. It supports both point-to-point domains and publish/subscribe (publish/subscribe)-type domains, and provides support for the following types: Approved messaging, transactional message delivery, consistent messaging, and persistent subscriber support. JMS also provides another way to integrate your application with the old backend system.

X. JTA (Java Transaction architecture)

JTA defines a standard API from which application systems can access various transaction monitoring.

Xi. JTS (Java Transaction Service)

JTS is the basic implementation of CORBA OTS transaction monitoring. JTS provides a way to implement the transaction manager. The transaction manager is the Java Transaction API (JTA) specification at the top level, and the OMG OTS specification is implemented at the lower levels of the Java image. The JTS transaction Manager provides transactional services for application servers, resource managers, stand-alone applications, and communication Explorer.

12, JavaMail

JavaMail is an API for accessing mail servers, which provides an abstract class of mail servers. Supports not only SMTP servers, but also IMAP servers.

13, JAF (JavaBeans activation Framework)

JavaMail uses JAF to process MIME-encoded message attachments. A MIME byte stream can be converted to a Java object or converted from a Java object. Most applications do not need to use JAF directly.

Then let's look at how JDBC is used in enterprise applications.

  Application of JDBC in enterprise-class application

The above examples are actually very basic, may be somewhat insignificant. It assumes a 2-layer structure. In a multi-tiered enterprise application, it is more likely to communicate with an EJB on the client and the EJB will establish a database connection. To achieve and improve scalability and system performance, the WebLogic server provides support for the connection buffer pool connection pools.

Connection pool reduces the cost of establishing and releasing database connections. This buffer pool can be built after the system is started, and then there is a request to the database, and the WebLogic server simply pulls the data out of the buffer pool. The data buffer pool can be defined in the Weblogic.properties file of the WebLogic server. (Refer to the example in the Weblogic.properties file for more detailed reference information in the WebLogic server's documentation)

Another common database feature that is applied at the enterprise level is transaction processing. A transaction is a set of statement that must be treated as one statement to ensure data integrity. JDBC uses the Auto-commit transaction mode by default. This can be done by using the Setautocommit () method of the connection class.

Now that we have some knowledge of JDBC, it's time to turn to Jndi.

Java Naming and Directory Interface (JNDI)

The JNDI API is used to perform name and directory services. It provides a consistent model for accessing and operating the enterprise

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.