You can delete records using remove from the home interface like entityHome.remove(primaryKey); or you can lookup for the local/remote interface and call remove: entityLocal = entityHome.findByPrimaryKey(primaryKey); entityLocal.remove(); Updating records in CMP is done by updating the CMP fields using the set methods. That's the idea behind the CMP (RAD - Rapid Application Development). If you wanna write your own UPDADE/DELETE SQL statements, you can use BMP or Session Beans with JDBC. Sergiu.
EJB-QL is EJB-Query language..... Only for querying data. No insert/delete/update stmts. It would be a bad design to mix CMP and BMP code in an entity bean. In a CMP, the container is responsible to delete your data from the database.We do not have to write any delete stmts in the ejbRemove() method.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com