First application of MyEclipse Development Server application will encounter a confused Java EE

Source: Internet
Author: User
Tags soap ibm mq wsdl

First, what is the EE (orange part is the part that must be understood, currently used in the project)

  Java EE is a solution for enterprise-class applications built on the 2 platform. Currently, there are 3 versions of the Java 2 platform:

(1) Java 2 Platform Micro version (J2ME) Java 2 Platform Micro Edition for small devices and smart cards;

(2) Java 2 Platform Standard Edition (J2SE) for desktop Systems Java 2 Platform standards Edition;

(3) Java 2 Platform Enterprise Edition (EE) Java 2 platfrom Enterprise Edition for creating server applications and services.

Sun's introduction of the Java EE is designed to overcome the shortcomings of the traditional client/server model, to cater to the trend of browser/server architecture, and to provide a platform-independent, portable, multi-user, Secure and standards-based enterprise-class platform that simplifies the development, management, and deployment of enterprise applications. The Java EE is a standard, not a ready-made product. Each platform developer has developed different Java EE application servers according to the Java EE specification, and the Java EE Application Server is the deployment platform of EE enterprise application. Because they all follow the Java EE specification, enterprise-class applications developed using the Java EE technology can be deployed on a variety of Java EE application servers.

  To promote and standardize the architecture of enterprise applications using the Java EE architecture, Sun also gives a suggested design model for the Java EE application: the Java blueprints. The Java EE Blueprints provides the architecture, design patterns, and related code for implementing the Java EE Enterprise application, and can partially simplify the complex work of architecting enterprise applications by applying the architecture model described by the Java blueprints.

  The Java EE consists of different parts of a complete enterprise application incorporating different containers (Container), each containing several components (which need to be deployed in the appropriate container), while various components can use various Java SERVICE/API. The Java EE containers include:
Web Containers (server-side containers), including two component JSPs and servlet,jsp and Servlets, are feature extensions to Web servers that accept Web requests and return dynamic Web pages. components in the Web container can use the components in the EJB container to complete complex business logic.
EJB Container (server-side container), contains the components of EJB (Enterprise JavaBeans), it is one of the core of the Java EE, mainly for the server-side business logic implementation. The EJB specification defines a framework for developing and deploying distributed business logic to simplify the development of enterprise-class applications, making it easier to have scalability, portability, distributed transaction processing, multiuser and security, and more.
Applet container (client container), which contains components as applets "applets are small applications written in the Java programming language that can be included in an HTML page in much the same way that a page contains images. 】。 An applet is a lightweight client embedded in a browser, which is generally used only when the Web page does not adequately represent the data or application interface. Applets are a means of replacing web pages, and we can only use J2SE to develop Applet,applet's various service and APIs that cannot use Java EE, for security reasons.
Application client container, which contains the components application client. The application client, relative to the applet, is a more heavyweight agent that can use most of the service and APIs of the Java EE.
With these four containers, Java EE has the flexibility to implement the architecture of the enterprise application described earlier.
in the View section, the Java EE providesThree ways:jsp (or servlet) in the Web container,Applets and application Client, respectivelyability to implement browser-oriented data performanceand data representation for desktop applications.the servlet in the Web container is the main means to realize the control of the controller part of the business process, while the EJB is mainly for the model part of the business logic implementation. As with various enterprise resources and enterprise-level applications, it relies on the various services and APIs of the Java EE.
in the various services and APIs of the Java EE,The JDBC "(Java Data Base Connectivity,java database connection) is a Java API for executing SQL statements that provides unified access to a variety of relational databases, which is a set ofclasses and interfaces written in the Java language are composed of "and JCA "(EE connector architecture, Java Connector Architecture) is an important complement to the EE standard set. Because it focuses on the development of connecting Java programs to non-Java programs and package middleware. "For connections to enterprise resources (various enterprise information systems and databases, etc.), Jax-RPC (Java application interface based on Extensible Markup Language XML Remote Procedure Call), JAXR (Java API for XML Registries provides APIs to interact with multiple types of registration services) and Saaj (soap with Attachments API for Javasaaj is an XML-based Messaging API specification implemented using the SOAP protocol in loosely coupled software systems) is the basic support for implementing Web services and Web services connections.
Various components of the Java EE
We explain in more detail the various components, services, and APIs of the Java EE, and see how to flexibly use and combine different components and services when developing different types of enterprise applications, depending on their needs and objectives.
· Servlet
Servlets are CGI technologies on the Java platform. The servlet runs on the server side, generating Web pages dynamically. Java Servlets are more efficient and easier to use than traditional CGI and many other CGI-like technologies. For Servlets, repeated requests do not result in multiple reprints of the same program, which relies on threading to support concurrent access.
JSP (Java Server page) is a technique that implements mixed coding of normal static HTML and dynamic page output. From this point of view, very similar to Microsoft ASP, PHP and other technologies. With the form of the separation of content and appearance, Web page production tasks can be easily divided into page designers and programmers, and easily synthesized by JSP. In the running tense, the JSP will be converted into a servlet first and run in the form of a servlet, so its efficiency and functionality are no different than that of the servlet, which is as efficient as it is.
The EJB defines a reusable set of components: Enterprise Beans. Developers can use these components to build distributed applications like building blocks. When assembling components, all enterprise beans need to be configured to the EJB server (General WebLogic, WebSphere and other Java EE application servers are EJB servers). The EJB server manages the EJB container as a bridge between the container and the low-level platform, and provides the container with the ability to access the system services. All of the EJB instances are running in the EJB container. EJB containers provide system-level services that control the lifecycle of EJBS. The EJB container simplifies the development of business logic by hosting its developers with technologies such as security, remote connectivity, life cycle management, and transaction management. There are three enterprise Beans defined in the EJB:
Session Beans
Entity Beans
Message-driven Beans
The JDBC (Java database Connectivity,java connection) API is a standard SQL (structured query Language, structured queries language) database provider, It enables database developers to write database applications using standard Java APIs. The JDBC API is primarily used to connect databases and directly invoke SQL commands to execute various SQL statements. The JDBC API enables you to execute generic SQL statements, dynamic SQL statements, and stored procedures with in and out parameters. JDBC in Java is quite similar to ODBC (Open Database Connectivity) in the Microsoft platform.
· Jms
JMS (Java Message Service,java Message service) is a set of Java application interfaces that provide services for creating, sending, receiving, and reading messages. The JMS API defines a common set of application interfaces and the appropriate syntax that enables Java applications to communicate with various message middleware, including IBM Mq-series, Microsoft MSMQ, and pure Java SONICMQ. By using the JMS API, developers do not have to know how to use different messaging products, or they can use a unified JMS API to manipulate various message middleware. By using JMS, you can maximize the portability of your messaging applications. JMS supports both point-to-point message communication and publish/subscribe messaging.
· Jndi
Because the Java EE application components are generally distributed across different machines, a mechanism is needed to facilitate component client users in locating and referencing components and resources. In the Java EE system, you use Jndi (Java naming and Directory Interface) to locate a variety of objects, including EJBS, database drivers, JDBC data sources, and message connections. The JNDI API provides a unified interface for applications to perform standard directory operations, such as locating and locating objects through object properties. Because Jndi is independent of the directory protocol, applications can also use Jndi to access a variety of specific directory services, such as LDAP, NDS, and DNS.
· Jta
The JTA (Java Transaction API) provides a standard interface for processing transactions in EE, which supports the start, rollback, and commit of transactions. At the same time on the general Java EE platform, a JTS (Java Transaction service) is always provided as a standard transaction service, and developers can use JTA to use JTS.
· Jca
The JCA Connector Architecture is part of the Java EE Architecture and provides developers with a set of architectures to connect various enterprise information systems (EIS, including ERP, SCM, CRM, etc.) to the EIS developer, They only need to develop a JCA-based EIS connection adapter, and developers can connect and use it in any Java EE application server. The implementation of the JCA-based connection adapter needs to involve service components such as transaction management, security management, and connection management in the Java EE.
· Jmx
The predecessor of JMX (Java Management Extensions) is Jmapi. JMX is committed to solving the problem of distributed system management. JMX is a collection of application programming interfaces, extensible objects and methods that can develop seamlessly integrated management applications for systems, networks, and services across heterogeneous operating system platforms, system architectures, and network transport protocols. JMX is a complete network management application development environment, it also provides a complete list of features that vendors need to collect, generate resource inventory tables, graphical user interfaces, network APIs to access SNMP, remote procedure calls between hosts, database access methods, and so on.
· Jaas
JAAS (Java authentication and Authorization Service) implements a Java version of the standard pluggable authentication Module (PAM) framework. Jaas can be used to authenticate user identities, enabling reliable and secure identification of who is executing Java code. At the same time, Jaas can also realize user-based access control by authorizing the user.
· Jacc
JACC (Java Authorization Service Provider Contract for Containers) defines a connection agreement between the EE application Server and the specific authorization authentication server, In order to insert a variety of authorized authentication servers into the Java EE product.
· Jax - rpc
By using JAX-RPC (Java API for xml-based RPC), existing Java classes or Java applications can be repackaged and published as Web services. JAX-RPC provides APIs that encode and decode RPC parameters (in/out), making it easy for developers to use SOAP messages to complete RPC calls. Similarly, for commercial applications that use EJB (Enterprise JavaBeans), you can also use Jax-RPC to wrap a Web service, and the WSDL interface of the Web Servoce is consistent with the method of the original EJB. JAX-RPC wraps the deployment and implementation of Web services for users, and soap/wsdl becomes transparent to developers of Web services, which facilitates the development cycle of Web services.
· Jaxr
JAXR (Java API for XML registries) provides APIs to interact with multiple types of registration services. JAXR runs a client to access a Web servcices that is compatible with the JAXR specification, where Web Services is the registration service. In general, registration services are always run as Web services. JAXR supports three types of registration services: JAXR pluggable Provider, registry-specific jaxr Provider, JAXR Bridge Provider (supports UDDI Registry and ebXML Registry/repository, etc.).
SAAJ (soap with attachemnts API for Java) is an enhancement of Jax-RPC, providing support for low-level SOAP message manipulation.

Enterprise-Class Application examples
Let's look at the application of a variety of components and services by assuming the Java EE implementation of an enterprise application. Suppose that the Application object is a manufacturer/retailer of a computer product, a sales system that publishes product information on its own website and can also transfer the product catalog to the computer product marketplace. The sales system is able to accept orders online (from its own web site or from the computer Products trading market) and then transfer to the internal enterprise management system for subsequent processing.
See Figure 3, this enterprise application can be architected in this way. The core of the enterprise application is the two business logic of product catalog management and product order management, implemented using EJBS and deployed in EJB containers. Because both the product catalog and the ordering information need to be persisted, use JDBC to connect to the database and use JTA to complete the database access transaction.
Figure 3 Java EE application example
Then use Jsp/servlet to implement Web performance for your app: online catalogue browsing and online ordering. In order to send the product catalog to a specific trading market, use JMS to implement asynchronous message-based product catalog transfers. In order to enable more external trading markets to integrate product catalogs and order businesses, it is necessary to use Web services technology to package the implementation of business logic. Because product order management needs to be handled by employees within the company, it is necessary to integrate internal user systems and access control services to facilitate employee use, integrate internal access control services using JACC, use Jndi to integrate internal user directories, and use Jaas for access control. Because the product ordering transaction triggers the subsequent operation of the ERP system (including warehousing, finance, production, etc.), it is necessary to use JCA to connect Enterprise ERP.
Finally, in order to incorporate this application into the overall system management system of the enterprise, a management client (which is deployed on a machine with other enterprise application management applications) is architected using application client, and this enterprise application is managed through JMX.

First application of MyEclipse Development Server application will encounter a confused Java EE

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: 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.