• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Question about entity bean

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
In HF EJB book, page 142, it says "the server uses only one bean to represent a particular entity", however, in the book Mastering EJB by Ed Roman, page 114, it says "Several Entity Bean Instances May Represent the Same Underlying Data", so which one is correct?
Thanks.
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question
The difference is in the definition of "bean" vs. "bean *instance*". A "bean" is a bean type, like, "CustomerBean". But several different CustomerBean *instances* might be used by the Container for a given underlying entity (in other words, a given underlying Customer).
The spec plays a little loose with that terminology--most of the time, we don't have to make a distinction between the word "bean" and the phrase "bean instance", but sometimes it does matter.
The main time the difference matters is when we talk about bean *removal* where an entity bean is *removed* and a particular Customer bean is *deleted* even though the actual underlying bean *instance* just goes back into the pool, and is never actually destroyed. The conceptual entity (say, the bean representing Fred Smith) is *removed* but the bean *instance* is not.
cheers,
Kathy
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic