J2EE 1.4 new features
Abstract: J2EE 1.4 new features
<table CellSpacing=0 cellPadding=0 width="100%" border=0> <tr> <td bgColor=#d9d9d9 colSpan=11> <table cellSpacing=0 cellPadding=3 width="100%" border=0> < tr> <td class=darkgreylarge> Title: J2EE 1.4 new features: an overview </ td> <td> views: 1027 </ td> <td align=right> time :2004-04-29 </ td> < / tr> </ table> </ td> </ tr> <tr> <td bgColor=#d9d9d9 colSpan=11> </ td> </ tr> <tr> <td bgColor=#d9d9d9 colSpan=11> < table cellSpacing cellPadding = 3 = 0 width = "100%" border = 0> <tr> <td> Author: Dave Landers </ td> </ tr> </ table> </ td> </ tr> <tr> <td bgColor=#d9d9d9 colSpan=11> </ td> </ tr> </ table> <table cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#cccccc border=0> <tr> <td> <table cellSpacing=1 cellPadding=4 width="100%" bgColor=#cccccc border=0> <tr bgColor=white> <td vAlign=top width="99%">
J2EE developers necessary skills list is quite lengthy. In this article, we will not discuss J2EE technology, but also will not discuss new technologies. We will have to explore some of its major new features, and then you will know in J2EE What features used in the project.
J2EE 1.4 brings a number of new and interesting features. They always focus on three main themes: Web services, messaging and the Web more easily developed. To meet the needs of these themes, composed of all the major J2EE standards have been upgraded - most norms are very important. The most important (and most) upgrade is JCA 1.5 norms and JSP 2.0 specification, as well as J2EE spec itself. In addition, some of the norms of the new (or is the new J2EE) - For example: JAX-RPC, Web services and J2EE deployment and management practices.
J2EE 1.4 in the new specification includes a number of new standards and technologies. Generally speaking, the most important J2EE in the expansion of content, most of the support for the Web services or XML. One of the most important number is:
Web services for J2EE (JSR-109)
This new standard describes how the Web service as a servlet or stateless EJB Session Bean to deploy. The most striking change is to increase the deployment of the new descriptors, such descriptors as a component will support the deployment of Web services.
JAX-RPC 1.1
JAX-RPC is for the use of remote procedure call SOAP the Java API. The use of these API, we can use remote object called Web services. J2EE in the use of JAX-RPC Remote EJB methods and calls are very similar.
JAX-RPC standard also defines a Web services (through its WSDL) mapped to the Java interface approach. JAX-RPC include the realization of a number of tools for generating from WSDL interfaces, stubs and so on, or generated from the WSDL interface.
J2EE Web services in the server and client use the JAX-RPC. Realized in the J2EE Web services (as a servlet or EJB) will be used JAX-RPC interface. If a component of long-distance calls to Web services, it will be used as JAX-RPC remote interface.
SAAJ 1.2
SAAJ is SOAP with attachments API for Java (for the Java API for SOAP with attachments), which allow those who transfer in the SOAP call in the annex can be visited Java.
JAXR
JAXR for XML registry is a Java API, API used to access the Web services registry, such as UDDI, and OASIS ebXML. Unfortunately, support for the J2EE does not require a particular registry, but can be used to achieve the API and the API.
XML support J2EE 1.4 specification requirements now support SAX 2, DOM level 2, and the structure of XML namespace, also requested support for XSLT. If you are prepared by the manipulation of XML J2EE applications, you must now support the latest version to work.
Management and deployment of J2EE API (JSR-77 and JSR-88)
Both API and IDE tools were provided by the concern. They provide a vendor independent API, J2EE application server used to control the management and deployment activities. This makes IDE (or our own development tools) can be very easily with a variety of application server interaction, without the need to use certain vendors in the large number of API.
Changes in norms
J2EE contains all norms in the J2EE 1.4 in varying degrees, there are some changes. However, some changes are minor, but J2EE "four major pieces" (EJB, JCA, servlets and JSP) increases the important new features.
Below on one of the most important changes introduced:
Enterprise Java Beans 2.1
EJB 2.1 norms improvements mainly in Web services and messaging. This will give details below. However EJB 2.1 has also increased the timer service and enhanced management of the entity bean containers of EJB QL-query language.
The new services allow any EJB timer (with the exception of a state of the session bean) to register in order to obtain containers from the time-based callback function. EJB can request a specific time (eg 10 seconds), a single callback signal, or you can arrange for regular (eg every 10 minutes) callback. This feature in some cases would be helpful, but it also has been greatly misused the potential - this allows time to tell us the answer.
EJB QL-on the enhancement of the operator ORDER BY, SUM, COUNT, AVG, MAX, MIN and MOD. Most of the application server in their specific to the expansion of the provider will provide these operators. And now they were eventually written into the standards.
Enterprise Java Beans 2.1 - Web services endpoint of Web services, EJB have already joined the session bean-free status as a Web service to use the capacity. This capability can be used to achieve the new Web services or through the Web service interface to some published EJB out.
To a non-existing state of the session bean into a Web service endpoint is relatively easy. WSDL generated from a remote interface (using JAX-RPC tools), and then in the ejb-jar.xml document into a service-endpoint elements. This element of service-endpoint or with both appear to have access to your EJB like another interface - so your EJB now have all or part of the long distance, local and Web services endpoint interface. Then, add a webservices.xml deployment descriptors, contained in document service-impl-bean and ejb-link the two elements. This put WSDL connected to the EJB, and notify the application server through the Web containers announced it out.
Similarly, can the existing Web services as a non-state session bean to achieve unless you use JAX-RPC tools to generate from WSDL interface.
Enterprise Java Beans 2.1 - Web Service Client
EJB 2.1 standard now explicitly allow any one EJB can be a Web service client (through JAX-RPC interface). Calling Web services and call another EJB manner very similar. Deployment descriptors used in the service-ref elements, Web services will be mapping, so you can use the "java: comp / env /" in the name of JNNI enquiries in the service.
Incidentally show that this technology not only in EJB can be used, and can be used in any J2EE components - So, you can also servlets or JCA adapters to call Web services.
Enterprise Java Beans 2.1 - messaging
EJB on the improvement of messaging and Java Connector Architecture closely linked. EJB 2.1 norms improved message-driven bean (MDB: message-driven bean), which allows the arbitrary (JMS) news types. Similarly, a message connectivity tools have been added to the deployment descriptors in the information sent to the designated component of the MBD or JMS destinations (and ejb-EJB ref allow you to "hook" with a very similar way) .
J2EE Connector Architecture 1.5
JCA 1.5 norms has been greatly changed. JCA 1.5 of the new changes is the source of all station adapter, which allows an external services (such as an EIS system) application server to send information. So JCA now become a two-way street. It is accompanied by a message Connector, a tool that all of the tools to deal with this station adapter and linking information MDB. Here is the main use cases and news-driven bean (MDB) linked into the station adapter to receive information, process information, generating information, and then queue up for a news MDB for processing. This feature is the key to the changes in the use of non-MDB JMS news types.
JCA other aspects of the improvements include the management of all to achieve different threads into the station adapter for the work management system improvements. JCA work management allows the use of threads, but not its threads application management conflict.
Servlet 2.4
Servlet 2.4 specification changes in the Web services mainly in the category as JAX-RPC servlet deployment to achieve the ability of Web services endpoint. This Web service providers to achieve an easy way.
Based on the preparation of a servlet Web services endpoint and the creation of an endpoint based on EJB almost identical. Use JAX-RPC interface creation tools from WSDL (or from the interface to create WSDL), then an ordinary JAVA achieve this type of interface. Then servlet elements (but not the use of servlet-mapping) in the web.xml statement in the class, to create a service contains impl-bean-and servlet-link elements webservices.xml file descriptors.
Servlet 2.4 also increased listener to obtain property (which has been available as the existing session attribute sniffers).
SingleThreadModel also did not agree to use. If you used this interface, you must have been aware that in fact it does not really solve the problem with Serverlet real-time. SingleThreadModel Serverlet process can only protect the single-domain and methods, but there is no doubt that it did not have the ability to protect other resources (such as those used in the static methods, or in the HttpSession object). Therefore, we do not agree to the use of SingleThreadModel, will be a good, thread-safe, by the practice of alternative programming.
Java Server Pages 2.0
JSP norms finally ripe. In JSP 2.0, and finally to write a script pages (without any "<%…%>" category of Java code).
The first is to increase the expression of improving language (expression language, EL), the expression of language from the JSP standard tags (JavaServer Pages Standard Tag Library, JSTL). EL is a simple, easy-to-use and sophisticated grammar, syntax no longer need this most of the "scriptlet." EL is based on the ECMAScript (JavaScript) and XPath, therefore, its syntax for the majority of Web developers, who will be feeling deja vu.
JSP 2.0 in the same library markings improved. Now, we have a simple API to write a marker. SimpleTag simple interface with a more simple life cycle - there is only one method and not doTag examples of the buffer pool and reuse. JSPFragment SimpleTag and its partner (used to assess body markings) can be completed Now the majority of the "classic tags" have done, but compared to the past, what will happen in more effort. In addition, these simple API means that more can be more easily labeled correctly, which means that fewer bug.
Another improvement is to mark the preparation of the document marked capacity. Such markings as a JSP document rather than to achieve the Java class. Marker is simple document preparation, and the deployment of more simple - you simply turn those documents in a similar foo.tag Add to the names of the WEB-INF/tags everything will be just fine. TLD descriptors do not need to prepare documents, because all the important information in the document marked its own in a statement.
Document marked the biggest advantage is in need of some visual HTML element when the marker. For example, the continuing format bean output. Previously, must be embedded in HTML or Java code contains pages approach. But marking of this type of document is the most natural function of usage. This also to the non-Java developers who opened the door to self-create markers. JSP 2.0 has also improved support for XML syntax, joined the JSR-45 support, as well as other languages debugging support.
JSTL
JSP standard marker library (JavaServer Pages Standard Tag Library, JSTL) is a very useful marker set. JSP2.0 these markers and in other areas to improve the integration of up very well. Unfortunately, JSTL JSP 2.0 specification is not necessary component. However, because it is such a useful, and with a wide range of support (for example, from Sun to Apache), we deserve to be mentioned here.
Summed up in the new version is full of new content, the question is how to use them?
Web Development
JSP regulate all of these changes have greatly improved the Web development experience. We finally have the possibility of preparing embedded Java code is not the JSP page. Moreover, a simple marker and marking the optional document marked become easier to prepare and easier to use. In the user interface (view) and back-end (controller), the separation between the better.
Messaging and messaging in the MDB JCA improvements in a lot of significance. First, it is evident that - EIS application server and the two-way communication between J2EE and would enhance the integration of existing enterprises.
But other benefits also far more than these. First of all, apart from those containers (RMI, HTTP and IIOP) owned by the socket, the adapter into the station a "right" to create and monitor socket. So, for instance, you can add a JCA adapter so you can telnet to the application server to perform some administrative tasks. Alternatively, FTP servers can be deployed as a standard component of the J2EE JCA, the mail server can be achieved. This possibility is endless.
Another possibility (which has been clearly stated in the standard) is a JMS provider. J2EE specifications must be achieved JMS application servers - but does not specify a particular messaging system of any demands. Therefore, every news providers usually to achieve their own information systems to support JMS. Moreover, they are usually there must be external systems can work together with them to communicate.
With J2EE 1.4, information providers now have made possible the creation of their support for JMS, J2EE, as a line with the standards of the JCA adapter can transplant the same. Adapter entry information can be dealt with end users, points out one end processing publisher. Then, the JCA can be deployed to any J2EE 1.4 application server. This will have to improve its application server interoperability between the potential, at least for the JMS message is this.
With Web services J2EE 1.4 specification, J2EE and Web services has been strong in the combination together. This has a variety of choices.
First, if you have existing systems based on EJB, just a simple deployment descriptors add JAC interface, as well as some entries, any non-state session bean can be published as Web services. This opened the existing deployment of Web services and interoperability.
The new Web service, you can prepare the same as above EJB the realization of the preparation can be a simple Java class (using JAX-RPC). Regardless of what way, you can pass some deployment descriptor entries deployment.
In addition, you can also use the J2EE application of any Web service, is in the implementation of any other long-distance calls, the use of JAX-RPC calls to Web services.
Concluding remarks on the J2EE 1.4 enhancements are unquestionable, and should enhance the usefulness of the J2EE platform and capabilities. JCA and the improvement in the MDB to enhance their back-end. To increase the support of Web services to improve the usefulness of the J2EE and interoperability. For those who wish to develop Web-based user interface of staff, the improvement is JSP lower the threshold for their use. In short, this is a great combination.
Now, the most difficult task for the things you - J2EE development - before, you need to determine how your project in the past in all these good things to choose choice. This will be a fun thing.
</ Td> </ tr> </ table> </ td> </ tr> </ table> ↑ Back
Tags: J2EE






