Upload
ngocong
View
215
Download
0
Embed Size (px)
Citation preview
Component-Based Software Engineering
ECE493-Topic 5Winter 2007
Lecture 23– Java Enterprise(Part A)
Ladan TahvildariLadan TahvildariAssistant ProfessorAssistant Professor
Dept. of Elect. & Comp. Eng.Dept. of Elect. & Comp. Eng.University of WaterlooUniversity of Waterloo
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 22
Abstract views(PIM,Written in UML)
Domain-specific Models(PSM,Written in UML with extra notation)
Implementations
From Abstractions to Implementations
Abstract systemarchitecture
EnterpriseMiddlewareArchitecture
OO:simple
Java: EJB,
JMS, JSP
.NET: COM+,ASP
Safety CriticalArchitecture
C
EmbeddedSystem
Architecture
CORBA
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 33
Java Enterprise Services
Sun Microsystems provides specifications for a comprehensive suite of technologies to solve large scale distributed system problems
This suite is the Java 2 Enterprise Edition, commonly known as J2EE which offers a suite of software specification to:– Design, develop, assemble and deploy enterprise applications
Discuss the architecture of J2EE and how it can be used to develop distributed multi-tiered applications
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 44
J2EE Technology Architecture
Serverplatform JTS JMAPI JNDI JMS JDBCJAXP JAAS …
Enterprise Java Beans Components
Java Serverpages Servlets
Application clients Web clients
IIOP,others
html
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 55
J2EE SuiteXML Technology– The Java API for XML Processing (JAXP)– The Java API for XML-based RPC (JAX-RPC)– SOAP with Attachments API for Java (JAAS)– The Java API for XML Registries (JAXR)
Web Technology– Java Servlets– JavaServer Pages (JSP)
Enterprise Java Bean (EJB) Technology– Session beans– Entity beans– Message-driven beans
Platform Services– Transactions– Java Message Service
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 66
J2EE-Based Application
The J2EE APIs enable distributed systems and applications through the following: – Unified application model across tiers with enterprise beans
– Simplified response and request mechanism with JSP pages and servlets
– Reliable security model with JAAS
– XML-based data interchange integration with JAXP
– Simplified interoperability with the J2EE Connector Architecture
– Easy database connectivity with the JDBC API
– Enterprise application integration with message-driven beans and JMS, JTA, and JNDI
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 77
Enterprise Application Model
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 88
Distributed Multi-tiered ApplicationsServices, clients (people and application) and data are distributed geographically across many platforms and many machines.
Multiple tiers:– Client-tier (browser or client-application)– Web-tier (web-server: Java Server Pages)– Business-tier (logic; Examples: Enterprise Java Beans)– Enterprise-Information-System (EIS) tier (database)
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 99
J2EE Clients
Web Clients– Dynamic web pages with HTML, rendered by web browsers– Can include applets– Communicates with server typically using HTTP
Application Clients– User interface using GUI components such as Swing – Directly accesses the business logic tier
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1010
Web-tier ComponentsClient can communicate with the business tier either directly or through servlets of JSP that are located in the web-tier
Web-tier can help in pre-processing and allows distribution of the functionality
Servlets are special classes to realize the request-response model (get, post of HTTP)
JSP is a developer-friendly wrapper over the servlet classes
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1111
Business-tier Components
This is defined by the logic that pertains to the (business) application that is being developed
Enterprise Java Beans (EJB) can be used to implement this tier
This tier receives the data from the web-tier and processes the data and sends it to the EIS-tier and takes the data from the EIS and sends it to the web-tier
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1212
Enterprise Information System Tier
In general this corresponds to the database (relational database) and other information management system
The other information management systems may include Enterprise Resource Planning (ERP) and legacy system connected through open database connectivity
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1313
Enterprise Java Beans
Enterprise Java Beans ( EJB ) is – a middleware component model for Java – a specification for creating server-side, scalable,
transactional, multi-user and secure enterprise-level applications
Presented by Sun in the 1999, they are easier than other technologies as RMI or CORBA
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1414
Application Server - Architecture
Presentation• HTML Application • Java Application
Business Logic
Data Access
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1515
J2EE Application ServerJava 2 Enterprise Edition standardizes interfaces for Application Server components
March 2, 2007March 2, 2007 ECE493ECE493--T5T5 1616
Java versus .NET for the Enterprise
Activation/Passivate (on stateful beans)JIT ActivationJava Server Page (JSP) ASP.NET
Instance PoolingObject Pooling
Can be implemented through JMSQueued Components
Java Message Service (JMS)Loosely Coupled Events
Java Transaction Service (JTS)Transactions
EJBSession Beans (Stateless, Stateful)Entity Beans Message-Driven Beans
COM+ ComponentsJava.NET