1. EJB AND JSP
Submitted by,
D.SHANMUGAPRIYA
I-MSC(IT)
NADAR SARASWATHI COLLEGE OF ARTS
AND SCIENCE
2. CONTENTS OF EJB
Introduction
What is the difference between web server &
Application server
Java enterprise edition on APIs
Elements of EJB components
Accessed by the EJB components
EJB Architecture
3. INTRODUCTION
Is the server side component architecture for java
platform , enterprise edition(Java EE)
EJB technology enables rapid and simplified
development of distributed , transactional , secure
& portable applications based on java technology.
Presented by sun in the 1999,which EJB
application runs in a J2E server or Application
server.
4. DIFFERENCE BETWEEN WEB SERVER
& APPLICATION SERVER
A web server contains only a web container but an
application server contains both a web container
and a EJB container.
A web server does not follows clustering but an
application server follows clustering.
5. JAVA ENTERPRISE EDITION ON API’s
CLIENT
SERVEL
TS/JSP
EJB JDB20 DATA
JTS/JTA JNDR
JAVAM
AIL
RMI-
IICP
JMS
CLIENT
SERVEL
TS/JSP
EJB JDB20 DATA
6. ACCESSED BY THE EJB COMPONENTS
EJB components runs inside a server and it can
be accessible by the following types of clients.
A desktop application can access EJB.
An applet can access EJB.
A web client using serve or JSP can access EJB
One EJB can access another EJB.
A CORBA client can access EJB.
7. ELEMENTS OF EJB COMPONENTS
Home interface
Remote interface
Bean class
1.HOME INTERFACE:-Home interface is a factory
for creating EJB objects.
The home interface contains life cycle methods like
create() , remove() , find xxx() ,etc.
Each method in home interface returns the remote
object . Or EJB object.
8. Cont..
2.REMOTE INTERFACE:-It contains logic
methods in order to create a remote interface
our interface must be extend EJB object
interface.
Remote interface is given in JAVAX .
ejb.*;package.
3.BEAN CLASS:-The Bean Class contains both
life cycle methods implementation + business
logic methods give in home interface &
remote interface and also it contains
container call back methods.
10. JSP
INTRODUCTION
Java server pages or as in normally called JSP is a
java based technology that simplifies the
developing of dynamic web sites
It is a technology developed sun micro system
back in 1999.
JSP pages are HTML pages with embedded code
that allows to access data form java code running
on the server.
JSP contains an extension on of . JSP
14. ADVANTAGE
Used need not write HTML and java code
separately.
JSP can be used for both front end and for writing
business logic.
JSP is dynamic compilation which means when a
JSP is modified.
JSP IS EFFICIENT:-every request for a JSP is
handled by a simple java method.
JSP IS SCALABLE:-easy integration with other
backend services.
15. DISADVANTAGE
As JSP pages are translated to serve and
complied.
It is difficult to trace errors occurred in JSP
pages.
JSP pages require double the disk space to hold
the JSP page.