I would like to know if is possible to optimize the remove process of a large amount of EJBs. We need to remove the old data of our database but the performance of this operation is bad because we make a find method to bring these data and do a loop over the result removing the entities but the entity bean have a relationship with another entity bean. Ex:
OrderEJB -> ItemEJB
What happens is a loop over the collection of orders and a loop over the collection of itens of the order to remove each one. This executes one delete comand to remove each entity and this execution takes a lot of time.