Hi,

I'm facing a "deadloop" problem with the valueobjects of an M:N relationship beans.

When loading the valueobject of bean A, it load the valueobject of bean B which try to load a valueobject of bean A and so on.
JBoss throws a "Reentrant method call detected" from the EJBException.


The problem is between a Person and a Task (each Person can have M Task where he is involved in and a Task can concern N Person.
PersonValue should have a Collection of Task and TaskValue a Collection of Person.


This is done by an hardcoded relation table with the following design :
TaskToPerson
*IdTaskToPerson
IdTask
IdPerson

The beans have this description :

<TaskBean>
   /**
    * @ejb.relation
    *  name="PERSON-TASK"
    *  role-name="task-concern-person"
    *  target-ejb="ejbPerson"
    *  target-role-name="person-involvedin-task"
    * @ejb.interface-method
    *  view-type="local"
    * @jboss.relation-mapping
    *  style="relation-table"
    * @jboss.relation-table
    *  table-name="TaskToPerson"
    *  create-table="false"
    *  remove-table="false"
    * @jboss.relation
    *  related-pk-field="id"
    *  fk-column="IdPerson"
    * @ejb.value-object
    *  aggregate="org.TechAdvantage.intranet.ejb.cmp.PersonValue"
    *  aggregate-name="Person"
    *  members="org.TechAdvantage.intranet.ejb.cmp.PersonLocal"
    *  members-name="Person"
    *  relation="external"
    *  type="Collection"
    */
   public abstract java.util.Collection getPersons();
</TaskBean>

<PersonBean>
   /**
    * @ejb.relation
    *  name="PERSON-TASK"
    *  role-name="person-involvedin-task"
    *  target-ejb="ejbTask"
    *  target-role-name="task-concern-person"
    * @ejb.interface-method
    *  view-type="local"
    * @jboss.relation-mapping
    *  style="relation-table"
    * @jboss.relation-table
    *  table-name="TaskToPerson"
    *  create-table="false"
    *  remove-table="false"
    * @jboss.relation
    *  related-pk-field="id"
    *  fk-column="IdTask"
    * @ejb.value-object
    *  aggregate="org.TechAdvantage.intranet.ejb.cmp.TaskValue"
    *  aggregate-name="Task"
    *  members="org.TechAdvantage.intranet.ejb.cmp.TaskLocal"
    *  members-name="Task"
    *  relation="external"
    *  type="Collection"
    */
   public abstract java.util.Collection getTasks();
</PersonBean>


I don't see obvious errors and I really don't see why this deadloop occurs as the relationtable should keep this clean.



Thanks for your help, ionel



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to