persistence@glassfish.java.net

What constraints on Pre EntityListener methods

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Tue, 30 Oct 2007 15:30:49 -0400

In my app when I persist an entity it cascades and persists sub-entities
within the top level entity.
I need to process each entry (top level and nested). I am wondering what
constraints are placed
in the kind of processing one can do in a Pre method of an
EntityListener class. For example can I do:

    * Update of existing entities in the EntityManager and calling
      em.merge on them
    * Creation of new entities and calling em.persist on them
    * Removal of existing entities in the EntityManager using em.remove
      on them

Also does the spec define the traversal order (is is depth-first or
breadth-first). I can't tell though I would assume it should be depth-first.

Thanks for any pointers.

-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com