Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 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

remove AND ejbLoad

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
If the client simply call remove method on the
EJBObject to remove the entity data in database by its primary key,why
ejbLoad is neccesary?
I'm using JBoss and BMP.
Thanks,
William.
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Short answer: The spec explicitly requires it.
Longer answer: because you are talking about an entity bean, the container is being asked to perform a business operation, it isn't just randomly doing some house-keeping of its own (e.g. calling ejbRemove on a stateless session bean would just be an aspect of container-determined housekeeping). It is being asked to remove an entity, which can mean a lot more than simply removing a row in the database. You might have a relationship to update, you might have an audit log to update, etc. Besides, at the end of the day, the spec says that ejbRemove is invoked on an instance that isn't in the pool, but is in fact the instance representing the entity, so the container is going to end up activating the instance and loading the data in order to establish that there is even such an entity in the first place.
[ February 19, 2004: Message edited by: Reid M. Pinchback ]
 
William Silva
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reid,
Thanks a lot !!!
I forgot about the relationships !
William.
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic