• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

From HFEJB book- pg.108

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very Thanks Keerthi P Selvam
 
chandrasekhar muvvala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what about Message Driven Beans???
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic