The Java EE 5 was published by Java Community Process via Java Specification Request 244, which points to additional specifications detailing the various technologies in Java EE 5 (see Resources). Bill Shannon of Sun Microsystems led an expert group to develop the code, which includes 31 members from the IT industry heavyweight to individual experts. The previous Java EE versions were:
Java EE 1.2 (released December 1999): This is the first version of the Java EE, which is released with the 2 standard Edition (J2SE). It contains 10 specifications and APIs for common Web tiers, business logic, presentation tiers, and messaging services that are required for enterprise applications.
Java EE 1.3 (released September 2001): Released through JSR 58, this version improves half of the Java EE 1.2 specification and introduces the XML API, connector architecture, and security framework.
Java EE 1.4 (released November 2003): This version improves 9 of the 13 technologies in Java EE 1.3, and introduces new WEB services and security support.
Java EE 5 is followed by 1.4, because Sun has removed the word "2" from its name (which is the practice from Java 1.2 called "Java 2") and now uses the words "Java" instead of "J" in the shorthand name of the technology. Now the Standard Edition is Java SE 6 (instead of J2SE 1.6), and the Enterprise Edition is Java EE 5 (not EE 1.5).
JAVAEE5.0 contains technology:
JSF1.2
JSP2.1
JSTL1.2
Java Servlet 2.5
EJB 3.0
JPA1.0
JAX-WS 2.0
JSF 1.2
JSF provides built-in support for common UI issues such as component state management, event handling, navigation, user input validation, and internationalization. Experienced developers can create customized, powerful reusable components and can create custom components for other client devices outside of a Web browser. Inexperienced users can reuse custom components in visual programming environments such as Sun Java Studio Creator, including the default JSF tag library for HTML interfaces. This allows novice programmers to create complex Web presentation layers.
There is a growing number of third-party JSF components in the field of open source and license-restricted software. Searching for "JSF components" or "JSF component Libraries" on the Web will find dozens of of them. Many components rely on asynchronous JavaScript + XML (Ajax) technology, which is the main driver behind the "WEB 2.0" movement. Web programmers can use them to create a better user experience than traditional Web applications, while avoiding the hassle of writing Ajax components from scratch.
JSP 2.1
JSP technology is starting from the Java 2.1. It uses the Java Servlet specification to support declarative UI programming. It supports writing the Ui,web application container as a document to convert these documents into Java Servlets and compile them, and then invoke them in response to the request. These documents often mix JSP directives and script fragments with some markup language, such as HTML. The JSP can use old-fashioned syntax (with special tags that start with <%, End with%>), or you can use the new syntax (well-structured XML). They are commonly used as the "View" part of the Model-view-controller (MVC) UI framework.
The compatibility between JSP 2.1 and JSF 1.2 is better than in previous versions, primarily because their EL syntax has been integrated into the unified El. The operations supported by EL include:
Access the properties of JavaBean in the context of the request, session, and application.
Perform logical tests to make various choices, such as hiding or displaying an element.
Generates the numbers and strings that are displayed in the UI by calculating.
In the past, JSP and JSF EL grammars were different, and they were computed differently by containers. Unified EL eliminates these differences and adds features such as:
An pluggable framework that supports the customization of EL's interpretations.
Expressions that support deferred execution, which the JSP tag processor can execute as needed.
Supports assignment operations, such as the ability to set JavaBean properties in the JSP code with an EL expression.
The good news for JSP Tag Library developers is that the tag processor now supports injecting resources with annotations, so it greatly simplifies the resource configuration and code required to execute Java naming and Directory Interface (JNDI).
JSTL 1.2
JSTL has been around for years, but before Java EE 5, Java EE does not yet contain it. The JSTL tag supports embedding the following types of elements in the JSP:
Over-programmed logic, such as loops and if/else structures.
Access to JavaBean, which can provide dynamic data to the UI and allow UI code to modify the data.
SQL command to perform database access.
Formatting directives that allow you to format UI output based on specific regions.
XML processing, such as Document Object Model (DOM) parsing or extensible Stylesheet Language (XSL) transformations.
JSTL 1.2 is a maintenance release that supports unified EL and resolves problems encountered in mixing JSF tags and JSTL iteration tokens in the same JSP page.
Java Servlet 2.5
The Java Servlet specification is at the heart of Java WEB Layer technology, and its history is as long as Java EE technology itself. This specification is designed to provide an efficient component-based approach to web application development and to ensure that Web applications can be ported to any server that implements this specification.
The Servlet 2.5 specification required by Java EE 5 is a maintenance version that makes minor improvements to version 2.4. It introduces dependencies on the Java 5 platform and introduces annotations that reduce the configuration requirements for the WEB application Deployment Descriptor configuration file (XML). It also adds some handy configuration features, such as the ability to configure servlets with wildcards and multiple url-pattern elements more flexibly.
Back to top of page
Enterprise Application Technology
There are a number of technologies that fall within the scope of enterprise applications, many of which have not changed in Java EE 5 or are not suitable for detailed discussion in this article. The main focus here is on two improvements: simplification of EJB development and new persistence features.
EJB 3.0
The EJB specification is the core of the Java EE platform. It defines how to encapsulate the business logic of an application and distributes business logic in a highly scalable, reliable, and transaction-aware manner, ensuring that concurrent data access does not break the data.
There are three basic types of EJBS:
Session beans are divided into two categories: stateless and stateful. Stateless session beans are used for business logic tasks that provide services for a single client request. Stateful session Beans maintain the "session state" of the client and are suitable for tasks that span multiple client requests. Session beans cannot be shared between clients. A session bean typically operates on one or more entity beans.
Entity beans represent persisted data, and data is typically loaded from the database. Entity beans can be shared between clients, and the EJB specification provides a mechanism for transaction security to ensure that entity beans can reliably serve multiple concurrent client requests without being compromised. The entity Bean can manage the persistence itself, or it can let the container manage it (container-managed persistence (container-managed persistence,cmp)).
Message-driven beans (MDB) are used to handle client requests that do not require a client to wait for a response. They typically interact with a Java Message service (JMS) queue, another enterprise application technology in-java EE 5, but can also serve asynchronous clients in other ways, and the client may not even be written in Java.
In the past, EJB development was complicated and cumbersome, and developers often had to rely on tools to manage all the interfaces and deployment descriptors needed to implement the EJB. The specification prescribes a number of limitations for business logic code that require extending a particular class or implementing a specific interface. To get a simple EJB reference, you need a lot of boilerplate code. These issues make EJB a bad name in the development community, and in many cases, ejbs are really bad.
EJB 3.0 greatly improves the EJB programming model, which is one of the main factors that increase the productivity of Java EE 5 developers. EJB can now be an annotated "plain Java object (plain old Java Object,pojo)", which does not need to extend a particular class. It only needs to implement a remote interface, you can define the interface yourself, or you can have the IDE automatically generate it. The deployment descriptor is no longer needed because the EJB container can extract all the information needed from the annotations on the EJB.
Java Persistence API (JPA 1.0)
JPA introduces an object-relational mapping (object-relational mapping,orm) framework for Java object persistence. The need for EJB is primarily considered when developing it, but it can be used with any Java object. You can use annotations to specify which objects and fields should persist, and which database tables and fields they should map to. JPA supports a query language similar to SQL. This query language can:
Define parameterized queries that can receive parameters in an ordered list (referencing parameters by index number) or named parameters that are referenced by name.
Queries are executed in relation to the relationships between persisted entities without requiring a join statement (however, you can use a join statement if you prefer).
Specify search criteria in a similar way to SQL (comparison operators, like statements, between statements, and so on) to define how the result set is treated (using the DISTINCT, ORDER by, and GROUP by operators).
JPA provides new functionality to the Java EE platform, addressing many of the hassles associated with manual persistence and container persistence.
Management and security
Java EE 5 requires three of the same management and security specifications as previous versions:
Application Deployment provides an API for deploying components and applications to the Java EE container. The tool can use this API to deploy code to a Java EE 5 container without having to restart the container. During development, the IDE often uses this API to support fast writing/testing/correcting loops.
Application Management Specifies the required properties and operations for container-managed objects. It is compatible with a variety of industry standard management protocols.
Authorization Contract for Containers (Java ACC) defines the semantics of the security policy provider and how to grant access to the operations in this contract. It requires the container to implement some interfaces that enable the deployment tool to manage authorization roles.
JAX-WS 2.0
The foundation of WEB services support in Java EE 5 is JAX-WS 2.0, a technology that replaces Jax-RPC 1.1. Both of these technologies support the creation of restful and SOAP-based WEB services without having to deal directly with the XML processing and data-binding details inherent in Web services. Developers can continue to use Jax-RPC (which still requires a Java EE 5 container), but it is strongly recommended to migrate to Jax-ws. Developers who are just beginning to learn Java Web services can skip Jax-RPC and use JAX-WS directly. They all support SOAP 1.1 over HTTP 1.1, so they are fully compatible: JAX-WS Web Service clients can access the Jax-RPC Web service endpoint, and vice versa.
JAX-WS has many advantages over Jax-RPC. JAX-WS: Supports the SOAP 1.2 standard (and SOAP 1.1). Supports XML over HTTP. If you prefer, you can not use SOAP. (For more information, see the article "use XML directly over HTTP for WEB services (where appropriate)". Use Java Architecture for XML Binding (JAXB) as the data mapping model. JAXB fully supports XML schemas and performs better (see below for more information). Introduced a dynamic programming model for both client and server. The client model supports message-oriented and asynchronous methods. Supports message transmission optimization mechanism (MTOM), a recommended specification for optimizing the transmission and format of SOAP messages. Upgraded WEB Services Interoperability (WS-I) support. (It supports basic Profile 1.1;JAX-WS only support for Basic Profile 1.0.) ) to upgrade the SOAP attachment support. (It supports Attachments API for Java [SAAJ] 1.3:jax-ws only supports SAAJ 1.2.) The Wsimport tool in Jax-WS automatically handles many of the details of WEB service development and integrates into the build process in a cross-platform way, which allows developers to focus on the application logic that implements or uses the service. It generates a variety of artifacts, including services, service endpoint interfaces (SEI), asynchronous response code, WSDL-based exceptions, and Java classes that are bound to pattern types through JAXB. JAX-WS also improves the performance of WEB services. In the article "Implementing High performance Web Services using JAX-WS 2.0" (see Resources for a link), a JAX-WS-Based Web service implementation (using the other two in Java EE 5 Web Service features-JAXB and StAX) and performance comparisons based on Jax-RPC's service implementations in Java EE 1.4. The study found that Jax-WS has produced 40% to 1000% performance improvements in various functional areas under different workloads.
JAVAEE6 contains technology:
JSF2.0
JSP2.1
JSTL1.2
Java Servlet3.0
EJB 3.1
JPA2.0
Jax-rs 1.1
Due to the new features of the limited JAVAEE6 of the layout to several links
JAVAEE6 new Features:
Extensibility: Web shards and pluggable Http://url.cn/0t9klO
Asynchronous processing of Servlet 3.0 Http://url.cn/4FEkxu
JSF 2.0 Simplified page Authoring Http://url.cn/44MGSK EJB
3.1 Five modes of improvement Http://url.cn/4Z8NyF introduced
JPA 2.0 Four new features detailed http://url.cn/25fnLb
The jax-rs of three new technologies introduced by Java EE 6 http://developer.51cto.com/art/200912/171668.htm
New Java Features (5)-Java EE 5 new features