Documente Academic
Documente Profesional
Documente Cultură
Confidential
Introduction
Confidential
Outline
Evolution of J2EE
J2EE Defined
J2EE Services
J2EE Scenarios
Application Clients, Servlets and JSPs
EJBs and declarative management
Roadmap
Confidential
‘Enterprise’ in J2EE
Difficulties
Needs to support transactions, resource-pooling, security, threading, persistence,
life-cycle management etc…
System programming at the expense of business logic
Developers have to become specialists
Proprietary APIs result in non-portable code
Confidential
What is J2EE ?
J2EE means :
J2EE Platform - A standard platform for hosting J2EE applications, specified as a set
of required APIs, specifications and policies.
J2EE Compatibility Test Suite - A suite of compatibility tests for verifying that a J2EE
platform product is compatible with the J2EE platform standard.
J2EE Reference Implementation - A reference implementation for demonstrating the
capabilities of J2EE and for providing an operational definition of the J2EE platform.
J2EE Application Programming Model - A standard programming model for
developing multi-tier, thin-client applications.
Confidential
J2EE Platform Architecture
Component
A component is an application level software unit.
The J2EE platform supports the following types of components :
Applets,
Application clients,
Web components and
Enterprise Java Beans (EJBs)
Container
All J2EE components depend on the runtime support of a system-level
entity called a container.
Containers provide components with services such as
life cycle management,
security,
deployment
threading
Confidential
J2EE Platform
TM
J2EE Patterns
Confidential
J2EE Components and Containers
Confidential
J2EE APIs
Confidential
J2EE Platform Roles
J2EE
Product
Provider
Applicati
on
Compon
ent
Provider
Applicati
on
Assembl
er Confidential
J2EE Naming Services
Confidential
J2EE Deployment Services
Confidential
J2EE Transaction Services
Confidential
Declarative Transaction Management
Confidential
J2EE Security feature
Confidential
J2EE Communication Technologies
Confidential
J2EE Application Scenario
• Client tier supports a variety of client types, both outside and inside of corporate firewalls.
• Middle tier supports client services through Web containers in the Web tier and supports business
logic component services through Enterprise JavaBeans (EJB) containers in the EJB tier.
• Enterprise information system (EIS) tier supports access to existing information systems
Confidential
J2EE Application Configurations
Stand-alone Client <> EJB Container <> RDBMS/EIS Resources : This configuration is the first step in
the evolutionary migration from a two-tier client server system.
Browser <> Web Container <> RDBMS/EIS Resources : This configuration is popular in small scale web
applications that are not supposed to serve an unpredictable number of users and is more appropriate
for systems that reside within the intranet of an organization. This is suitable for applications where use
of an application server is overkill.
Browser <> Web Container <> EJB Container <> RDBMS/EIS Resources : This configuration is the
recommended full-blown architecture where the application has to be robust and scalable with a
multitude of users demanding the maximum performance out of the system.
Confidential
Client options
Confidential
Servlets and JSPs
Servlets :
Java Components that extend HTTP Server
Generation of dynamic content
• Managed by a Container
• Output can be HTML, XML, WML, or any other content type
Loaded on Demand
Unloaded at Any Time
Mapped to URLs
Important abstractions
Request, Response, Servlet Context, Sessions
JSPs :
Text-based documents contain HTML, JSP tags, Java code
“Inside-Out” Servlets, declarative, presentation-oriented way of writing Servlets.
Benefits:
• Server-Side Scripting
• Templates
• Encapsulation of Functionality
Confidential
Servlets or JSPs ?
Confidential
Approaches to Content Generation
Confidential
Enterprise Java Beans
A specification for creating server-side scalable, transactional, multi-user secure enterprise-level applications.
Provides a consistent component architecture framework for creating distributed n-tier middleware.
Consists of
EJB server,
EJB containers that run on EJB server
EJBs that run in these containers
EJB clients and other auxiliary systems like the Java Naming and Directory
Interface (JNDI ) and the Java Transaction Service (JTS).
Three Types of EJBs
Session Beans : meant for client sessions and business logic
Stateful
Stateless
Confidential
Client’s view of EJB
Confidential
Anatomy of an EJB
Client Code :
Confidential
Statechart of Session Bean
Confidential
Statechart of Entity Bean
Confidential
Message Driven Beans and JMS
Confidential
B-2-B Application Scenario
Confidential
Some Transaction Attributes
Required Mandatory
Default
RequiresNew NotSupported
Unconditinal RM not supported
Commit Required By J2EE product
Confidential
Deployment Descriptor : Example
Confidential
Security Descriptors : Examples
Confidential
J2EE : What it is not
Remember
There are J2EE compliant vendor products BUT there is no J2EE compliant ‘application’ !
Confidential
Thanks
Confidential