Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to modify a CMP-Entity-Bean?

 
Oliver Rensen
Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

when I want to modify a record in the database, I must remove() the Entity-Bean and create() a new one. Is this correct, or does exist any possibility to make an update on a CMP-Entity-Bean?

Thanks in advance.

Regards,
Oliver
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need to do is update the persistent fields by using the abstract setter methods. This is done in the ejbStore method. The container will deal with everything else.
 
Oliver Rensen
Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger, thanks a lot. Your solution works!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic