P. 1
Deploying an Entity EJB

Deploying an Entity EJB

Ratings: (0)|Views: 29|Likes:
Published by irraju

More info:

Published by: irraju on Aug 21, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/15/2011

pdf

text

original

 
1
Developing an EntityEnterprise Java Bean
 
2
 © 
Copyright 2000 Sun Microsystems, Inc., All rights reserved.
Entity Bean Tutorial Agenda:
How to develop and deploy an entitybean by example:
What
is an entity bean
When
to use entity beans
Steps for implementing
an entity bean
Necessary
interfaces
and implementationclasses
Overview of some APIs used in EJB:RMI, JNDI
EJB™
APIs
Steps for
assembling and deploying
anenterprise beanSteps for
writing and running the client
of anenterprise bean
 
3
 © 
Copyright 2000 Sun Microsystems, Inc., All rights reserved.
What Is an Entity Bean?
model
business concepts
that can be expressedasnouns(i.E. Customer inventory item).
Model permanent data:
entity bean instancevariables read from & stored in DB, gives
inmemory view and manipulation of data
.Entity beans support
shared access
frommultiple users.Always
transactional.
Entity beans
can be re-instantiated fromattributes stored in database:
Survives
EJB™ server
crashes
.
Lives as long as the data in the database.
Entity BeansAn entity bean represents an object view of business data storedin persistent storage or anexisting application. The bean provides an object wrapper aroundthe data to simplify the task of accessing and manipulating it. This object interface lends itself to software reuse. Forexample, an entity bean representing user account information can be used by ordermanagement, user personalization, and marketing in a uniform way.An entity bean allows shared access from multiple clients and can live past the duration of client’s session with the server. If the state of an entity beanis being updated by a transactionat the time of server crash, the entity bean’s state is automatically reset to the state of the lastcommitted transaction.The most common application for entity beans is for the
representation of data in arelational database
.•A simple entity bean can be defined to represent a
row
in a database table, where eachinstance of the bean represents a specific row.
Complex
entity beans could represent
views of joined tables
in a database. For example enentity bean could represents a customer’s order and order items.For example, the online bookstore application maintains information about customers,products, and orders using the entity beans
Customers
,
Products
, and
Orders
. The Customerbean provides customer details, such as name, address, credit card# of the customer. TheOrders bean provides order details.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->