2. LIST OF CONTENTS:-
1. Application servers
2. What is J2EE?
3. Main Technologies
4. Application Scenarios
5. J2EE APIs and Services
6. EJB – a closer look
3. APPLICATION SERVERS
• In the beginning
Centralized, non-distributed
terminals
mainframe
terminals
3
In the 90’s, systems should be
client- server
4. APPLICATION SERVERS
4
Today, enterprise applications use the multi-tier model
“Multi-tier applications” have several independent components.
An application server provides the infrastructure and services to run such applications
Application server products can be separated into 3 categories:
J2EE-based solutions
Non-J2EE solutions (PHP, ColdFusion, Perl, etc.)
And the Microsoft solution (ASP/COM and now .NET with ASP.NET, VB.NET,
C#,
etc.)
5. WHAT IS J2EE?
It is a public specification that embodies several
technologies
Current version is 1.5
J2EE defines a model for developing multi-tier, web based,
enterprise applications with distributed components
J2EE BENEFITS
High availability
Scalability
Integration with existing systems
Freedom to choose vendors of application servers, tools, components
Multi-platform
6. J2EE BENEFITS
Flexibility of scenarios and support to several types of clients
Programming productivity:
Services allow developer to focus on business.
Component development facilitates maintenance and reuse
Enables deploy-time behaviors Supports division of labor
7. MAIN TECHNOLOGIES
JavaServer Pages (JSP)
Servlet
Enterprise JavaBeans (EJB)
JSPs, servlets and EJBs are application components.
JSP
Used for web pages with dynamic content
Processes HTTP requests (non-blocking call-and-return)
Accepts HTML tags, special JSP tags, and scriptlets of Java code
Separates static content from presentation logic
Can be created by web designer using HTML tools
8. SERVLET
Used for web pages with dynamic content
Processes HTTP requests (non-blocking call- and-return)
Written in Java; uses print statements to render HTML
Loaded into memory once and then called many times
Provides APIs for session management
EJB
EJBs are distributed components used to implement business logic
(no UI)
Developer concentrates on business logic
Availability, scalability, security, interoperability and integrability
handled by the J2EE server
Client of EJBs can be JSPs, servlets, other EJBs and external
aplications
16. J2EE SERVICES AND APIS
JNDI - Naming and directory services
Applications use JNDI to locate objects, such as environment
entries, EJBs, datasources, message queues
JNDI is implementation independent
Underlying implementation varies: LDAP, DNS, DBMS, etc.
Transaction service:
Controls transactions automatically
You can limit the transactions explicitly
Or you can specify relationships between methods that make up a
single transaction
17. J2EE SERVICES AND APIS
Security
Java Authentication and Authorization Service (JAAS) is the new (J2EE 1.3)
standard for J2EE security
Authentication via userid/password or digital certificates
Role-based authorization limits access of users to resources (URLs, EJB methods)
Embedded security realm
J2EE Connector Architecture
Integration to non-J2EE systems, such as mainframes and ERPs.
Standard API to access different EIS (GlassFish Server)
Vendors implement EIS-specific resource adapters
18. J2EE SERVICES AND APIS
JDBC
JavaMail
Java API for XML Parsing (JAXP)
Web services APIs
20. HOME INTERFACE
Methods to create, remove or locate EJB objects
The home interface implementation is the home object
(generated)
The home object is a factory
REMOTE INTERFACE
Business methods available to clients
The remote interface implementation is the EJB object
(generated)
The EJB object acts as a proxy to the EJB instance
25. SESSION BEAN
Stateful session bean:
Retains conversational state (data) on behalf of an individual
client
If state changed during this invocation, the same state will be
available upon the following invocation
Example: shopping cart
Stateless session bean:
Contains no user-specific data
Business process that provides a generic service
Container can pool stateless beans
Example: shopping catalog
26. ENTITY BEAN
Represents business data stored in a database persistent
object
Underlying data is normally one row of a table
A primary key uniquely identifies each bean instance
Allows shared access from multiple clients
Can live past the duration of client’s session
Example: shopping order
Bean-managed persistence (BMP): bean developer writes JDBC code
to access the database; allows better control for the developer
Container-managed persistence (CMP): container generates all JDBC
code to access the database; developer has less code to write, but also
less control
27. MESSAGE-DRIVEN BEAN
Message consumer for a JMS queue or topic
Benefits from EJB container services that are not available
to standard JMS consumers
Has no home or remote interface
Example: order processing – stock info
28. SOURCES & RESOURCES
The J2EE Tutorial. Sun Microsystems
www.java.sun.com/j2ee
www.theserverside.com
www.Wikipedia.com/j2ee
www.javatpoint.com