Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications.

Similar presentations


Presentation on theme: "Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications."— Presentation transcript:

1 Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications that is Integrated Suitable for enterprise applications Widely available Includes all of the basic middleware capabilities for building distributed systems 11/24/2018 Architecture - Comp 650

2 Enterprise applications require
High throughput Load balancing Efficient communications High availability Highly reliable communications Persistent, asynchronous communication option Distributed transactions High security Ability to interoperate with whatever Structured naming with de-centralized administration 11/24/2018 Architecture - Comp 650

3 Trademarks etc Java, J2EE, J2SE, J2ME, and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Graphics on pages 3, 4, 5 Copyright © Sun Microsystems, Inc. All Rights Reserved. 11/24/2018 Architecture - Comp 650

4 The 3 Cs of Java Enterprise
Components Containers Connectors 11/24/2018 Architecture - Comp 650

5 Java Enterprise Overview
11/24/2018 Architecture - Comp 650

6 Presentation technologies
JSP (Java Server Pages) JSP Standard Tag Library Servlets JSPs are compiled into servlets prior to execution JSF (Java Server Faces) 11/24/2018 Architecture - Comp 650

7 Key middleware services
Communication: RMI-IIOP, JMS, JCA Naming: JNDI (part of J2SE) Persistence: JPA, JDBC, JDO Transactions: EJB, JTA, JTS Security: (next page) 11/24/2018 Architecture - Comp 650

8 J2SE v1.4 Security Features
JAAS – Java Authentication and Authorization Service JCE – Java Cryptography Extension JSSE – Java Secure Socket Extension Java GSS-API – Kerberos V5 secure communications Java Certification Path API 11/24/2018 Architecture - Comp 650

9 J2EE for web services Java Architecture for XML Binding (JAXB)
Java API for XML-Based Web Services (JAX-WS) SOAP with Attachments API for Java (SAAJ) Java API for XML RESTful Service (JAX-RS) new Java API for XML Messaging (JAXM) Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-Based Remote Procedure Call (JAX-RPC) Two leading registry standards: ebXML Registry and Repository standard, UDDI (Universal Description, Discovery, and Integration) SOAP was originally part of JAXM 11/24/2018 Architecture - Comp 650

10 Enterprise Java Beans Session beans
Represent business processes and data about an interaction with a client Two types: Stateless Stateful Entity beans (deprecated, essentially) Represent persistent data and data integrity rules Two types of persistence: Container-managed persistence Bean-managed persistence 11/24/2018 Architecture - Comp 650

11 Invoking an EJB 2 method JNDI EJB Container Home Object Client EJB
3 Request new EJB object 5 Return EJB object reference Client EJB Object 4 Create EJB object 6 Invoke method JNDI NS, eg LDAP Request home object 1 2 Return home object reference 7 Delegate request to enterprise bean(s) Enterprise Bean(s) 11/24/2018 Architecture - Comp 650

12 Message-driven beans MDB are stateless beans that MDB have no
Listen for and handle JMS messages Participate in transactions if necessary MDB have no Home interface Remote interface Interfaces directly callable by clients (clients just send messages) An MDB tutorial An MDB article 11/24/2018 Architecture - Comp 650

13 If you remember one thing
Enterprise beans are Single-threaded Ignorant of security Ignorant of transactions Ignorant of networking The container handles all that Containers tend to be pricey 11/24/2018 Architecture - Comp 650

14 Leading EJB containers
BEA Weblogic IBM Websphere JBoss (open source) Glassfish (open source) 11/24/2018 Architecture - Comp 650

15 Glassfish demo includes admin console calc-servlet
an EJB that the servlet uses JAXB for XML response 11/24/2018 Architecture - Comp 650

16 Deployment descriptors
Deferred binding for many of the things the bean developer need not worry about, including Access control Transaction requirements Persistence parameters Type of bean Classes used for home and remote interfaces See pp 418 – 419 for examples 11/24/2018 Architecture - Comp 650

17 EJB roles Source: Mastering Enterprise JavaBeans, Second Edition, by Ed Roman, Scott Ambler, and Tyler Jewell 11/24/2018 Architecture - Comp 650

18 Web sites (3 of thousands)
Sun’s Java EE site: (was Mastering EJB III (downloadable) EJB design patterns (downloadable) J2EE Architect’s Handbook (downloadable) 11/24/2018 Architecture - Comp 650

19 JEE and ABC Stakeholders: software community
Developing organization: software vendors Technical environment: OO paradigm Distributed computing Java Architects’ experience: varied Requirements: described earlier See p 403 11/24/2018 Architecture - Comp 650

20 Tactics used See pp 411-412 Comments on these? 11/24/2018
Architecture - Comp 650

21 Some JEE anti-patterns
Excessive layering Where are the (really) likely variation points? Magic Servlet Instead of “it reads phone numbers from a database and formats the results as HTML,” Consider a servlet for LDAP interface and a JSP for result formatting 11/24/2018 Architecture - Comp 650

22 More anti-patterns Overstuffed Session
Data should default to request scope Long-lived data should be in the business tier Everything is an EJB (“golden hammer”) EJBs are at their best when Not using an existing database Adding transactions Adding secure remote access If benefits are not there, DON’T USE EJBs! 11/24/2018 Architecture - Comp 650

23 Yet another anti-pattern
Excessive Round-Tripping Introduce a Façade that makes lots of calls on the server side and returns a TransferObject Stateful When Stateless Will Do Use a client-side adapter to manage arguments Stateless façade on top of entity beans Cache data in the client 11/24/2018 Architecture - Comp 650


Download ppt "Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications."

Similar presentations


Ads by Google