• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Why not BMT Entity Bean?

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please explain why entity bean cannot have BMT? Sorry if this topic has already been posted here.

Thanks.
[ August 12, 2004: Message edited by: Keerthi P ]
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Keerthi P:
Can someone please explain why entity bean cannot have BMT? Sorry if this topic has already been posted here.

Thanks.

[ August 12, 2004: Message edited by: Keerthi P ]



I think because the Container decides WHEN to go to the database, basing it's decisions on the entity bean lifecycle. Even with BMP, the bean developer should only write the code to access/update the database, in the container callbacks methods. If you then want to use all the capabilities of the Container, thus CMP, the Container writes not only the implementation class for your ABSTRACT entity class, but also all the code that access/updates the database, not to speak about finder and select methods. In such a scenario results quite difficult to immagine a possible BMT approach. I think the container gives you high level methods just to tell you WHEN thing happen, but it does all the LOW-LEVEL work. Now, with entity bean, the real things happen at the low-level, while with session beans, the real things happen in the business methods, which you should implement. A part from the bean lifecycle there is nothing the container does in a session bean at low-level, therefore the bean developer has got complete control over the business logic.
 
Keerthi P
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh yes... silly me . It is not possible to demarcate the transaction in the ejbLoad() and ejbStore() and the methods that are abstract in case of a CMP bean - if we want to use BMT.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic