Change of Java EE 6 Architecture

Source: Internet
Author: User

[It168 analysis comment]Again, I saw the Reza user go to the page for Java EE 6. Like a member of the mighty job force,
Reza carries his latest "resume"-Java EE 6
To show our developers a fresh feeling. However, from the lines in this article, we can still be aware of its confusions and confusions: "I have paid so much, Java EE 6
Can it be successful again? Will developers adopt it? If not, what else should we do ?......". When ejb2. * collapsed, it set off an opposition to using ejbs.
. In fact, I had a relatively late contact with javaee (probably in early 2007) and never used ejb2. *, but it was not objective enough to attack it.
EJB: struts, spring, and Hibernate are everywhere. However
With continuous attention and understanding, we gradually find ourselves blindly and ignorant. Java EE 6
Feature preview makes me more eager to learn it. "The political factors of technology selection are often greater than those of technology itself ." Java EE 6
The promotion should also require more successful practical projects to win "political factors ". However, just like a fresh graduates who have no experience, they have to face employment. Besides strength, they rely on luck ......

 Simple Review

 
Java ee 5 is a mature, widely deployed platform that supports server-side friendly development. The reference of EJB 3.0 has overturned the original business component development model, and the original
The entiy bean model of ejb2.x is replaced by the JPA of the persistent layer. JSF is also taken as the official standard presentation layer framework, and of course our JAX-WS
2.0 replaces the JAX-RPC as a new soap Web Services API. The goal of Java ee 5 is very clear-by introducing
Annotation, pojo programming model, zero-Configuration)
So as to reduce the complexity of development and help developers to free themselves from the XML hell. Although Java EE
There are still a lot of people holding a wait-and-see attitude, but it may be necessary to prove that "Java ee 5
The most favorable evidence of success is that, due to the changes mentioned above, many people say they have considered accepting Java EE for the first time. These guys are still experiencing
After the Java EE programming model, I kept giving feedback to them.

 Overall situation View

Java EE 6 will be a huge step towards the concise, efficient, and well-integrated platform ideal. Java EE 6 has a series of technological innovations: There are brand new webbeans1.0 and JAX-RS 1.1 API, there is also a more mature old API servlet3.0.

Except for a few small changes (for example, the standard global jdni naming will not be discussed in this article), most topics in JSR 316 are carefully selected. Now let's take a look at these changes. For more details, I recommend that you download the public review draft. This is the URL: http://jcp.org/en/jsr/detail? The id = 316.

  Cut down useless APIs

 
The first version of Java EE was released in 1999. In an extremely competitive industry, it has always been the official standard, and that time is not very short. However, during this period, Java EE
As a result, the platform has become bloated and full of useless outdated APIs, which is inconvenient to deploy. Java EE 6
We started to process these APIs to make sure the platform is more lightweight and to free up more space for the healthy growth of Java EE. Table 1
Show the cut-off APIs. Of course, the reasons are described as follows:

Cut API Reason for being cut
JAX-RPC JAX-RPC is a programming model for early interaction with soap web services through rpc calls. Since Web services are separated from RPC models after maturity, more robust, more features and popular JAX-WS APIs have actually replaced JAX-RPC.
EJB 2.x entity beans CMP The complex, bulky, and overly complex ejb2. * Entity Bean model has been replaced by the pojo-based popular lightweight JPA Persistence Layer Model of Java ee 5.
Jaxr Jaxr is one of the few Java APIs used for registering a service in UDDI. Unfortunately, since UDDI is not widely used, jaxr has almost no application and few vendors support it, so it is inevitable that it will be hacked.
Java EE application deployment (JSR-88) JSR 88 is a standard API used to configure and deploy J2EE applications on the application server. However, this API has never been supported by many vendors and has to be cut off.
JSR-77 (Java EE Management) Similar to JSR 88, jsr77 was originally used to create Monitoring and Management APIs for application servers. However, the enthusiasm of major suppliers is still not high, and it is hard to escape the fate of hacking.
Table 1: APIs chopped in Java EE 6

  In principle, application server vendors do not need to support these technologies forcibly, but it is not ruled out that some large suppliers will continue to maintain these chopped APIs for a period of time.

What do you think about this adjustment? Too radical? Still too conservative? Do you still use the API shown in the preceding table? Are there other APIs that you think should be cut down?

 

One of the major attacks on Java EE is that it is too large. Indeed, most small and medium-sized Java Web applications simply do not use all Java EE technologies.
(Full Java EE stack ). You can imagine that to build an application similar to SOA, messages, transactions, persistence, and Web
Services, but cannot use presentation layer technologies such as JSP or JSF.

Profile is designed to solve this problem.
Profiles is actually a subset of Java EE APIs and has their own solutions for specific applications. For example, the proposed Java EE
Web profile only contains some APIs that are most likely to be used by the vast majority of Java Web applications. Like profiles
This concept has been achieved in a standardized world for a long time. You may have known that Java me actually supports profiles.
-- Supports the running environment of each specific device. Similarly, profiles can be used to better organize the increasingly complex web services world (such as WS-I
Basic security profile ).

Although Java EE 6 defines some rules through JSR for creating new profiles, this time only one profile is elected-Web profile. Table 2 lists the comparison between the Web profile and the Java EE platform:

API Web profile Full Profile
Servlet 3.0

JSPs 2.2
Jstl 1.2
El 1.2
JSF 2.0 Supported
Webbean 1.0 (?) Supported Supported
Ejbs 3.1 (lite) Supported Supported
Ejbs 3.1 (full)   Supported
JPA 1, 2.0 Supported Supported
JTA 1, 1.1 Supported Supported
JMS 1.1   Supported
Javamail 1, 1.4   Supported
JAX-WS 2.2   Supported
JAX-RS 1.1   Supported
Jaxb 2.2   Supported
Jacc 1.0   Supported
JCA 1.6   Supported
Table 2: Web profile of Java EE 6

 
The reason why webbeans can also be shortlisted was also a big question mark. So far, we have determined whether to add webbeans to Java EE 6.
Still stick to each other. The focus of the debate on webbeans is: How is it suitable to join the Java EE system? Is there a JSR?
The technology studied must be correct? Do you think so? Maybe you don't know about webbeans. I will extend this topic below. Webbeans or not
Should it be included in Java EE 6? If this is not done, what changes should JSR make? At the same time, you should also pay attention to EJB Lite. Although it is not the full version
But this time it was added to the Web profile. I will also briefly mention EJB lite below.

What do you think about Java EE's profiles? The profile-compliant lightweight application server is
Is it useful to you? What are the technologies involved in Web profile? Is there too little content, too much, or is it just right? It is enough to have it, or in Java
Other profile defined in EE 6? Or should we consider the simplified "Java EE basic profile "?

 

Now let's take a look at the work done by the jsr316 expert group to see which technologies have been added to Java EE
Platform. Although this work is very important, we are also eager to hear your suggestions on the content mentioned above. From this chapter, let's take a quick look at the Java EE 6 API
. I strongly recommend that you explore each of the following APIs in depth. I think you will like the received content, and all the APIS will be more exciting because of your feedback.

  Webbeans 1.0

 
At the milestone of Java EE 6, webbeans may be the most groundbreaking API. Webbeans fills Java EE
. Although webbeans evolved from seam, Google guice, and spring, they are not directly replicated. Actually,
Webbeans itself has many unique innovations. Webbeans are composed of gaving king and
Led by Bob Lee of Google. The following briefly describes the features of webbeans:

Webbeans
, JPA, ejb3, and other programming models are unified, making people feel that they are a well-integrated development platform. All of this is through
Entity and common Java Bean are registered as webbeans components, and then through the use of El
Expression. Of course, "dependency injection" can also be performed between them ". In fact, webbeans allows you to ignore the JSF
Backing beans.

Generally, in the context, webbeans implicitly manage the lifecycle of all registered components. In addition to the traditional
In addition to main scopes such as request, session, and application, it also adds some new scopes "dependent" and"
Conversation ". Dependent explicitly "inherits" the caller's scope, while conversation is a brand new scope ,(
Conversation context is associated with a browser window (or page card), which is identified by a flag submitted with each request.
The conversation scope uses a separate segment of the HTTP session to migrate data between pages. ) From ejb3.1
It fills in the gaps between the client component scope (including stateless, stateful, and shared) and the web application center.

Webbeans introduces a set of mature dependency injection features and provides a complete Java-centric type security development platform. These features include: Integration of any non-EJB Java objects, injecting unmanaged objects into managed objects, using the object factory, specify a componentized deployment environment and use stereotypes to manage annotations.

 
Webbeans can bind the Interceptor (interceptor) to the target object through annotation, enhancing the Java EE
The interceptor model. The interceptor bound through annotation automatically acts on the target object, which is different from the current Java ee 5 (Java EE
5. the target object and interceptor are indirectly associated, such as the xml configuration file ).

The impressive features listed are only the tip of the iceberg of webbeans. Webbeans adds many other great features to develop integration solutions for the next-generation Java ee. Would you like to learn more about webbeans, please click the link below to download the public draft: http://jcp.org/en/jsr/detail? The id = 299.

Address: http://www.javaeye.com/news/5547-translation-java-ee-6-architecture-changes

Related Article

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.