Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

From HFEJB book- pg.108

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFEJB Book at page 108, i did'nt understand the concept "Represents a process" ? can anybody explain please !...............
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
chandrasekhar muvvala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very Thanks Keerthi P Selvam
 
chandrasekhar muvvala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about Message Driven Beans???
 
Right! We're on it! Let's get to work tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic