Submitted by,
D.SHANMUGAPRIYA
I-MSC(IT)
NADAR SARASWATHI COLLEGE OF ARTS AND
SCIENCE
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
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.
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.
JAVA ENTERPRISE EDITION ON API’s
CLIENT
SERVELT
S/JSP
EJB JDB20 DATA
JTS/JTA JNDR
JAVAMA
IL
RMI-
IICP
JMS
CLIENT
SERVELT
S/JSP
EJB JDB20 DATA
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.
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.
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.
EJB ARCHITECTURE
H
R
client
NAMING SERVICE
HOME
OBJ
EJB
OBJ
BEAN
OBJECT
R CLIENT EJB SERVER
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
JSPARCHITECTURE
CLIENT
INTER
NET
WEB
SERVE
R
DATA
BASE
Client
request
web server
Html
sent to
client
HTML
JSP EXECUTION PROCEDURE
System JSP
JSP
translator
serve
JSP
translator
buffer
Server
object
JRE
JSP LIFE-CYCLE
Java server page
JSPLNIT () (LOAD
PROCESS)
JSP SERVICES ()
(ACCEPT REQUEST)
JSP DESTROY ()
(UNLOAD
RESOURCES)
REQUEST
RESPONS
E
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.
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.

Ejb and jsp

  • 1.
  • 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 theserver 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 EDITIONON API’s CLIENT SERVELT S/JSP EJB JDB20 DATA JTS/JTA JNDR JAVAMA IL RMI- IICP JMS CLIENT SERVELT S/JSP EJB JDB20 DATA
  • 6.
    ACCESSED BY THEEJB 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 EJBCOMPONENTS  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:-Itcontains 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.
  • 9.
  • 10.
    JSP INTRODUCTION  Java serverpages 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
  • 11.
  • 12.
    JSP EXECUTION PROCEDURE SystemJSP JSP translator serve JSP translator buffer Server object JRE
  • 13.
    JSP LIFE-CYCLE Java serverpage JSPLNIT () (LOAD PROCESS) JSP SERVICES () (ACCEPT REQUEST) JSP DESTROY () (UNLOAD RESOURCES) REQUEST RESPONS E
  • 14.
    ADVANTAGE  Used neednot 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 JSPpages 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.