Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity bean update using ejbStore()  RSS feed

 
shawn kennedy
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have this one module in my application which is meant for editing a users data.A data entry personell gets a entry field for a clients name once he enters the name he will get all the fields from the database related to tht client.He can then change the info and press the edit button which will edit data in database.
What my problem is i know there is an in built ejbStore() in entity beans if i am using CMP have to write no sql calls also as it updates the database itself.
However if i am using BMP i have to write the calls to dbase myself wht i dont understand is tht when the user clicks the button how do i associate tht button press with ejbStore() method invocation to update database.

Or do i have to write a sep method tht will
update the database.
Could someone pls help and clarify my doubts.
EJB just seems to be gettin confusin by the day.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
with cmp 2.0 the cleaner solution is to make available on the component interface of your entity beans the setXXX methods and than just call them to change the status, the container should correctly call the ejbStore method to sinchronize the data between memory and database.
regards,
Marcos Maia
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!