Gerard C. Weatherby
Introduction
Enterprise Java Beans
1
Introduction
What are Enterprise Java Beans?
Glossary
Why use them? (Or why not.)
Enterprise Java Bean server features
Enterprise Java Bean roles
Enterprise Java Bean programming restrictions
How does it work (briefly)
Types of beans
An example
Deployment descriptor
Archive Files
J2EE Server
Heidi J. C. Ellis and Gerard C. Weatherby
Introduction
Enterprise Java Beans
2
Glossary
• J2EE - Java 2 Enterprise Edition -- EJB’s + JSP’s etc.
• JMS - Java Messaging Service
• JNDI - Java Naming and Directory Interface
• JSP - Java Server page. Here this could mean JSPs, servlets,
and/or beans installed on the web server
• API - Application Programmer’s Interface
• JVM - Java Virtual Machine
• SQL - Structured Query Language
• AWT - abstract window toolkit
• I/O - input output
• J2EE RI - J2EE reference implementation
Gerard C. Weatherby
Introduction
Enterprise Java Beans
3
• IDE - Interactive Development Environment
Heidi J. C. Ellis and Gerard C. Weatherby
Introduction
Enterprise Java Beans
4
What is an Enterprise Java Bean (EJB)?
• Special type of “bean”
bean - Just a Java class. Typically follows naming conven-
tions for methods to create properties. May also implement
class XXXBeanInfo to provide information about class.
• Enterprise Java Bean is a bean designed to run inside an EJB
server.
• From the server, we get certain benefits. By the nature of the
EJB and server interaction, we also have several limitations.
• EJB is supplemented by a deployment descriptor: an XML file
which provides the container with information about how the
bean is to be deployed.
Gerard C. Weatherby
Introduction
Enterprise Java Beans
5
Why use Enterprise Java Bean?
• EJB servers are expensive.
Sun Reference Implementation (RI) is free -- and worth
every penny!
Don’t overspend on application tech
• Best used where scale of application -- primarily transaction
rate -- warrants performance demands.
• For sites with less traffic, using HTML/JSP/servle