In order to remove an entity from the db you should call EntityManager.remove(Entity bean) or if you create a native query and execute it. Your BankComponent.remove() method what does it contain? Does the client and the bean belong to an enterprise application or the client bean is connecting to EJB container remotely?
Note :- I am using BMP of EJB 2.0
But specification says that if I call remove on the component interface for an entity bean it will delete the record from the database.
Even if I call remove() method on the component interface i.e. on the EJBObject,
ejbRemove() does not get called and no database record is deleted.
Do I have to put the delete sql statement in the ejbRemove() but even if I place the delete sql statement in the ejbRemove(), this method is also not getting called when I call the remove method on the component interface.
I have even tried calling remove method on the home inteface that takes primary key object as an argument but it is still not working
He does not suffer fools gladly. But this tiny ad does:
Devious Experiments for a Truly Passive Greenhouse!