Enterprise Java Development@TOPIC@
Built on: 2014-03-07 00:42 EST
Copyright © 2014 jim stafford (jcstaff@apl.jhu.edu)
Abstract
This presentation introduces the JavaEE enterprise framework and its associated API standards.
Become familiar with JavaEE architectures
Understand the purpose of Java SE, Java ME, and Java EE
Understand the purpose of key Java EE APIs
Understand the purpose of the JavaEE container/application server
Understand the difference between the API and the provider
Understand there are significant variations of JavaEE architectures
Core Language
Formerly called J2SE. Changed started with JavaSE 6
Java APIs are what applications are written against.
Standardized
Java Runtime Edition (JRE) is what applications run with.
Many providers
Java Developer Kit (JDK) is what applications are built with
Many providers
JRE and JDK provider choices are independent
Formerly called J2ME
Targeted at smaller devices
Small footprint
Limited power
Limited and sporadic bandwidth
Formerly called J2EE. Change started with JavaEE 5
Targeted at enterprise deployments commonly deployed to data centers
Persistence/Data Access
Scaling
Transactions
Security
Resource Management
Availability
Distributed
Web-based
Generally deployed in N-Tiers
Interface
Transacted Business Logic
Persistence/Back-end Integration
Contains
APIs (standardized)
Compatibility test suites
Reference Implementation (Glassfish)
Providers (e.g., Glassfish, JBoss, WebSphere, WebLogic)
Subset of JavaEE APIs targeted at key use cases
Share common underlying APIs for consistency
Provide smaller gates of entry for providers
Provide means to eliminate deprecated specs from concern
Risk fragmenting community and introducing confusion -- not taken lightly
WAR deployments
Only JavaEE profile to date
Required APIs
Servlet 3.0
JavaServer Pages (JSP) 2.2
Expression Language (EL) 2.2
Debugging Support for Other Languages (JSR-45)
Standard Tag Library for JavaServer Pages (JSTL) 1.2
JavaServer Faces (JSF) 2.0
Common Annotations for the Java Platform (JSR-250) 1.1
Enterprise JavaBeans (EJB) 3.1 Lite
Java Transaction API (JTA) 1.1
Java Persistence API (JPA) 2.0
Bean Validation 1.0
Managed Beans 1.0
Interceptors 1.1
Contexts and Dependency Injection for the Java EE Platform 1.0
Dependency Injection for Java 1.0
Noted Exclusions
JMS and Message-Driven Beans (MDBs)
Full EJB support, including remote interfaces and legacy 2.x capabilities
JAX-WS/SOAP endpoints
Different types
Deployed to client (Applets)
Deployed to data center (Servlets and EJBs)
Undefined deployment (App Clients)
GUI components typically running in browser
Access middle-tier indirectly thru Web container and HTTP
Generate content to browser from Web container
Can be UI/HTML-based
Can be service/XML (or other structured data forms)-based
May contain EJBs providing transactional support
Provide runtime support for JavaEE application components
Provide an interpose layer arround/between each component
Inject required components
Application developers may think of the Application Server==Container
Containers address specifics of the standards (e.g., deployment artifact structure)
System-level software component
Extends standard APIs into specific resources (e.g., JDBC)
Framework provided for:
Connection/Resource Pooling
Security Management
Transaction Management
Client-side API defined by java.net
JavaEE adds server-side APIs for servlet, JSPs, JSF, and web services
Connectivity with relational databases
Client API is DB-centric(rows, columns, result sets)
Resource Adapater API preferred over legacy JDBC SPI for integrating DB drivers
API for naming and directory services
Primarily used as a bootstrap to identify and/or access other components
Plays a registry role in dependency injection
Standard API for XML processing
SAX parser
DOM parser
XSLT transformation
Original API for supporting SOAP-based communication over HTTP
Follow-on API for supporting SOAP and other Web service communication
Supports multiple bindings and protocols
API for more web-centric, Web service communication
High level API for application-level processing
Low level API for special handling of input/output content
Plugable framework for authentication modules
Contract for deployment tools and JavaEE products
Plugin capability to deploy applications to application servers
Extends the RMI-style of remote interfaces to be independent of underlying protocol
JavaSE Native Remote Protocol (JRMP)
CORBA IIOP
Permit Java EE application components to access CORBA services compatible with RMI programming restrictions
Permit CORBA clients to access EJB components
Using dependency injection versus JNDI lookup eliminates the need for applications to use most of API
1.2"CORBA Integration"; Dec 1999
RMI over IIOP
1.3"Local Interface EJBs"; Sep 2001
Connector API
EJB (2.x) local interfaces and new CMP model
1.4"Web Service Enabled"; Nov 2003
SOAP Web Services
Deployment, Management, JAAS
5"Ease of Development"; May 2006
Annotations
Better Defaults
EJB and Servlet Dependency Injection
JPA, StAX, JAX-WS
6"More Ease of Development"; Dec 2009
Profiles; making some components optional
Flexible deployments; no EJB.jar or EAR requirement
No interface EJBs
Component and Dependency Injection
7More Ease of Development, Cloud; June 2013
Table 5.1. JavaEE 6 Specifications
| Spec | Version | Spec | Version |
|---|---|---|---|
| JavaSE | 6 | ||
| JDBC | 3.0 | ||
| Java Persistence | 2.0 | ||
| EJB | 3.1 | ||
| Common Annotations | 1.1 | ||
| JNDI | 1.2 | ||
| JTA | 1.1 | ||
| JMS | 1.1 | ||
| JAAS | 1.0 | ||
| Dependency Injection for Java | 1.0 | ||
| CDI | 1.0 | ||
| Managed Beans | 1.0 | JAX-RPC | 1.1 |
| Servlet | 3.0 | SAAJ | 1.3 |
| JSP | 2.2 | JAXR | 1.0 |
| JAX-RS | 1.1 | JSTL | 1.2 |
| JAXB | 2.2 | JSF | 2.0 |
| StAX | 1.0 | JSP Debugging | 1.0 |
| Expression Language | 2.2 | Java EE Management | 1.1 |
| Bean Validation | 1.0 | Java EE Deployment | 1.2 |
| Interceptors | 1.1 | Connector | 1.6 |
| JAX-WS | 2.2 | JACC | 1.4 |
| Web Services Metadata | 2.0 | JavaMail | 1.4 |
| Web Services for JavaEE | 1.3 | JAF | 1.1 |
"Java Platform, Enterprise Edition 6 Specification (JSR-316 Final Release)", Roberto Chinnici and Bill Shannon, http://jcp.org/aboutJava/communityprocess/final/jsr316, 2009 Sun Microsystems.
"JavaEE Version History", Wikipedia, http://en.wikipedia.org/wiki/Java_EE_version_history, September 3. 2012.