The RequestBean.removeOrder business method deletes a given order from the database. This method uses the EntityManager.remove method to delete the entity from the database.
Order order = em.find(Order.class, orderId); em.remove(order);