Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CS6320 – J2EE L. Grewe MOTIVATION: E-commerce and Enterprise Computing Models Four models for e-commerce and enterprise computing: • Business to business • Business to customer • Customer to customer • Intra-business Implementation technology has gone through two-tier to componentbased n-tier architecture. Why N-tier Systems Architecture Different presentations of the same business data. Change the business logic, or database type or schema without impacting the clients. Hide middle tier (business logic) behind a firewall. Database connection pools. Selectively upgrade parts of the architecture without rewriting the entire application. N-tier Systems Java™2 Platform, Enterprise Edition (J2EE) J2EE is introduce to reduce the cost and complexity of developing n-tired enterprise applications J2EE defines a complete platform that guarantees services in such areas as: • • • • • • Security Transaction Management Resource Management Naming and Directory Messaging Concurrency control J2EE Architecture The J2EE runtime environment consists of four major parts: • Application components • Containers • Resource manager drivers • Database support J2EE Application Components J2EE defines four application component types: • Application clients • Applets • Servlets and JavaServer pages (JSP) • Enterprise JavaBeans™ components (EJB) J2EE Containers J2EE supports four separate types of containers, corresponding to the four types of components: • Application client containers • Applet containers • Web containers • Enterprise bean containers All types of containers must provide Java 2 Platform Standard Edition (J2SE) compatible runtime environment J2EE Architecture Benefits of J2EE Architecture J2EE server core manages resources and transactions and includes the java 2 platform virtual machine J2EE platform services may be implemented on a single system or distributed over disparate platforms. J2EE-compliant servers guarantee the seamless and correct execution of all components and middleware services. Developers do not need to manage the integration of service implementations from various vendors (it is the J2EE platform vendor’s responsibility). Other benefits of J2EE Architecture Service API are specified as Enterprise Java technology interfaces, which may be plugged seamlessly into the server The application server provides services such as: • Load balancing • Replication • Database connection pooling • Thread pooling • Caching J2EE is vendor independent – Application builders can choose from a variety of server implementations. Component-based Server Development The application server may be implemented using reusable components. Server components: • Have well-defined business interfaces for their clients. • Interact with the container through welldefined API. J2EE technology provides a set of vendorindependent programming interfaces for the implementation of the container (middle tier). Component-based Server Development EJB technology forms one core of the J2EE architecture. Presentation logic is implemented using servlets and JSP. Business logic objects are implemented as EJB and/or servlets. Data layer represented with EJB. J2EE Containers J2EE containers provide: • An environment and context for J2EE components to execute. • Resource management and other system services to the components. Operating system processes. Threads. Container services are exposed to components through interfaces (the container itself is specified using interfaces). J2EE Connectors Connectors are used to integrate various existing information systems in a J2EEbased application. J2EE Connectors Leverage investments in existing enterprise systems. A connector is a vendor-specific bridge used to link an existing system to the J2EE system. Connectors manage (and hide) all the logic used to integrate with proprietary systems and present their services as JavaBeans components. J2EE Applications A J2EE application is a collection of software components that are engineered to be distributed across multiple tires of an N-tier system. These software components are implemented as EJB. J2EE applications may play the role of a client or a server depending on which tier they are deployed. J2EE applications are not required to be distributed, but they should be engineered so that they may be deployed on a J2EE Application Components There are two types of J2EE application components: Web components for handling presentation logic and EJB components for handling the business logic. • Web components are implemented as JSP or servlets. These components shield the first-tier clients from the complexity of the application server. • JSP presents application server services in a form that is usable by any browser-based client. • Servlets manage the presentation of application server services for clients such as Java appplets, Java applications and Web browsers.