• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP ejbRemove  RSS feed

 
Sreenath Madasu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!
I want to write a CMP bean. But the underlying persistnat store has a column DELETE_INDICATOR. I don't want to delete the row from the database when I say ejbRemove but to set it to 'Y'. As I understand CMP writes JDBC logic to delete it from database . What is the work around?

Thanks
Sreenath
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using CMP Entity Bean, ejbRemove delete the associated database record. There's no way out.
Nevertheless, as what you want to do is not a delete but an update, just don't call the remove() method.

ejbStore() will update the DB for you, udating the value to "YES".

Another alternative is to use SLSB + DAO and to code the specific logic you want to have
 
Sreenath Madasu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jean!
Sreenath
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!