wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes From HFEJB book-  pg.108 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "From HFEJB book-  pg.108" Watch "From HFEJB book-  pg.108" New topic
Author

From HFEJB book- pg.108

chandrasekhar muvvala
Greenhorn

Joined: Nov 12, 2003
Posts: 9
In HFEJB Book at page 108, i did'nt understand the concept "Represents a process" ? can anybody explain please !...............
Keerthi P
Ranch Hand

Joined: Aug 19, 2003
Posts: 203
Originally posted by chandrasekhar muvvala:
In HFEJB Book at page 108, i did'nt understand the concept "Represents a process" ? can anybody explain please !...............


Let me try to explain. Before that do not forget to remember that a Session Bean represents a "process" and an entity bean represents a "thing" or "entity".

That means a session bean will do some job and may use entity beans (data) to convincingly accomplish the job. For instance, you may have a session bean (TellerBean) that performs the operation of a bank teller. Performing the operation of a teller is a process. To do this, the TellerBean needs Account, which can be modelled as an entity bean. In other way, the TellerBean uses Account to perform processes - processes like credit, debit, etc on an Account (our entity bean).

TellerBean (session bean)
- credit()
- debit()

Account (entity bean)
- getAccountNumber()
- getBalance()
- getHolderName()

As you might have observed from the above class model, an entity bean exposes methods that are primarily data-oriented. But the TellerBean is more intelligent in a way it knows how to play with entity beans and perform *real" operations, what are called processes. In this case, it does credit() and debit() processes.

Certain *things* are required to do a process. Model those *things* as entity beans. A process can be modelled as a method (stateless) or a group of co-ordinating methods (stateful) in a Session bean.

Hope it helps.


Cheers.<br />Keerthi<br />(SCJP, SCWCD, SCBCD)
chandrasekhar muvvala
Greenhorn

Joined: Nov 12, 2003
Posts: 9
Very Thanks Keerthi P Selvam
chandrasekhar muvvala
Greenhorn

Joined: Nov 12, 2003
Posts: 9
what about Message Driven Beans???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: From HFEJB book- pg.108