UDDI and ebXML Standard Formats Java EE Application Assembly and Deployment Application Component Provider Application Deployer and Administrator Enterprise JavaBeans Technology JavaServer Pages Standard Tag Library JavaBeans Activation Framework Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) SOAP with Attachments API for Java Java Database Connectivity API Java Naming and Directory Interface Java Authentication and Authorization Service Simplified Systems Integration Sun Java System Application Server 9.1 2. Using the Tutorial Examples 3. Getting Started with Web Applications 5. JavaServer Pages Technology 7. JavaServer Pages Standard Tag Library 10. JavaServer Faces Technology 11. Using JavaServer Faces Technology in JSP Pages 12. Developing with JavaServer Faces Technology 13. Creating Custom UI Components 14. Configuring JavaServer Faces Applications 15. Internationalizing and Localizing Web Applications 16. Building Web Services with JAX-WS 17. Binding between XML Schema and Java Classes 19. SOAP with Attachments API for Java 21. Getting Started with Enterprise Beans 23. A Message-Driven Bean Example 24. Introduction to the Java Persistence API 25. Persistence in the Web Tier 26. Persistence in the EJB Tier 27. The Java Persistence Query Language 28. Introduction to Security in the Java EE Platform 29. Securing Java EE Applications 31. The Java Message Service API 32. Java EE Examples Using the JMS API 36. The Coffee Break Application | Distributed Multitiered ApplicationsThe Java EE platform uses a distributed multitiered application model for enterprise applications. Applicationlogic is divided into components according to function, and the various application componentsthat make up a Java EE application are installed on different machines dependingon the tier in the multitiered Java EE environment to which the applicationcomponent belongs. Figure 1-1 shows two multitiered Java EE applications divided into the tiers described inthe following list. The Java EE application parts shown inFigure 1-1 are presentedinJava EE Components.
Although a Java EE application can consist of the three or four tiersshown inFigure 1-1, Java EE multitiered applications are generally considered to be three-tieredapplications because they are distributed over three locations: client machines, the Java EE servermachine, and the database or legacy machines at the back end. Three-tiered applicationsthat run in this way extend the standard two-tiered client and server modelby placing a multithreaded application server between the client application and back-end storage. Figure 1-1 Multitiered Applications ![]() SecurityWhile other enterprise application models require platform-specific security measures in each application, theJava EE security environment enables security constraints to be defined at deployment time.The Java EE platform makes applications portable to a wide variety of securityimplementations by shielding application developers from the complexity of implementing security features. The Java EE platform provides standard declarative access control rules that are definedby the developer and interpreted when the application is deployed on the server.Java EE also provides standard login mechanisms so application developers do not haveto implement these mechanisms in their applications. The same application works in avariety of different security environments without changing the source code. Java EE ComponentsJava EE applications are made up of components. AJava EE component is a self-contained functionalsoftware unit that is assembled into a Java EE application with its relatedclasses and files and that communicates with other components. The Java EE specification defines the following Java EE components:
Java EE components are written in the Java programming language and are compiledin the same way as any program in the language. The difference betweenJava EE components and “standard” Java classes is that Java EE components areassembled into a Java EE application, are verified to be well formed andin compliance with the Java EE specification, and are deployed to production, wherethey are run and managed by the Java EE server. Java EE ClientsA Java EE client can be a web client or an applicationclient. Web ClientsAweb client consists of two parts: (1) dynamic web pages containing various typesof markup language (HTML, XML, and so on), which are generated by webcomponents running in the web tier, and (2) a web browser, which rendersthe pages received from the server. A web client is sometimes called athin client. Thin clients usually do notquery databases, execute complex business rules, or connect to legacy applications. When youuse a thin client, such heavyweight operations are off-loaded to enterprise beans executingon the Java EE server, where they can leverage the security, speed, services,and reliability of Java EE server-side technologies. AppletsA web page received from the web tier can include an embedded applet.Anapplet is a small client application written in the Java programming languagethat executes in the Java virtual machine installed in the web browser. However,client systems will likely need the Java Plug-in and possibly a security policyfile for the applet to successfully execute in the web browser. Web components are the preferred API for creating a web client program becauseno plug-ins or security policy files are needed on the client systems. Also,web components enable cleaner and more modular application design because they provide away to separate applications programming from web page design. Personnel involved in webpage design thus do not need to understand Java programming language syntax todo their jobs. Application ClientsAnapplication client runs on a client machine and provides a way for usersto handle tasks that require a richer user interface than can be providedby a markup language. It typically has a graphical user interface (GUI) createdfrom the Swing or the Abstract Window Toolkit (AWT) API, but a command-lineinterface is certainly possible. Application clients directly access enterprise beans running in the business tier. However, ifapplication requirements warrant it, an application client can open an HTTP connection toestablish communication with a servlet running in the web tier. Application clients writtenin languages other than Java can interact with Java EE 5 servers, enablingthe Java EE 5 platform to interoperate with legacy systems, clients, and non-Javalanguages. The JavaBeans Component ArchitectureThe server and client tiers might also include components based on the JavaBeanscomponent architecture (JavaBeans components) to manage the data flow between an application client orapplet and components running on the Java EE server, or between server componentsand a database. JavaBeans components are not considered Java EE components by theJava EE specification. JavaBeans components have properties and haveget andset methods for accessingthe properties. JavaBeans components used in this way are typically simple in designand implementation but should conform to the naming and design conventions outlined inthe JavaBeans component architecture. Java EE Server CommunicationsFigure 1-2 shows the various elements that can make up the client tier. Theclient communicates with the business tier running on the Java EE server eitherdirectly or, as in the case of a client running in a browser,by going through JSP pages or servlets running in the web tier. Figure 1-2 Server Communication ![]() Your Java EE application uses a thin browser-based client or thick application client.In deciding which one to use, you should be aware of the trade-offsbetween keeping functionality on the client and close to the user (thick client)and off-loading as much functionality as possible to the server (thin client). Themore functionality you off-load to the server, the easier it is to distribute,deploy, and manage the application; however, keeping more functionality on the client canmake for a better perceived user experience. Web ComponentsJava EE web components are either servlets or pages created using JSP technology (JSPpages) and/or JavaServer Faces technology.Servlets are Java programming language classes that dynamicallyprocess requests and construct responses.JSP pages are text-based documents that execute as servlets butallow a more natural approach to creating static content.JavaServer Faces technology buildson servlets and JSP technology and provides a user interface component framework forweb applications. Static HTML pages and applets are bundled with web components during application assemblybut are not considered web components by the Java EE specification. Server-side utilityclasses can also be bundled with web components and, like HTML pages, arenot considered web components. As shown inFigure 1-3, the web tier, like the client tier, might includea JavaBeans component to manage the user input and send that input toenterprise beans running in the business tier for processing. Figure 1-3 Web Tier and Java EE Applications ![]() Business ComponentsBusiness code, which is logic that solves or meets the needs of aparticular business domain such as banking, retail, or finance, is handled by enterprisebeans running in the business tier.Figure 1-4 shows how an enterprise beanreceives data from client programs, processes it (if necessary), and sends it tothe enterprise information system tier for storage. An enterprise bean also retrieves datafrom storage, processes it (if necessary), and sends it back to the clientprogram. Figure 1-4 Business and EIS Tiers ![]() Enterprise Information System TierThe enterprise information system tier handles EIS software and includes enterprise infrastructure systems suchas enterprise resource planning (ERP), mainframe transaction processing, database systems, and other legacyinformation systems. For example, Java EE application components might need access to enterpriseinformation systems for database connectivity. Copyright © 2010, Oracle and/or its affiliates. All rights reserved.Legal Notices |