James,
If you have a bidirectional relationship between two EJBs you cannot have the same bidirectional relationship between their related value objects. In case you have this, XDoclet will always call the getXXXValue method in the related EJB to get the corresponding value object, so you will have a recursive call here. This is detected as a call to a non reentrant EJB, or, in the case you have the EJB marked as reentrant, a stack overflow exception due to the recursive calls. The only solution I'm aware of is to be very careful about the definition of your value objects, so you don't include any bidirectional relationship among them.
Regards Jose
James Ward wrote:
Hello XDoclet friends. I am having a problem with CMR and Value Objects. I would like to have value objects for both sides of the relationship, but it seems when I do so, I get a "Reentrant method call detected" error in JBoss. Here is how I have my beans' relationships setup:
UserBean: /** * @ejb.interface-method * view-type="both" * * @ejb.relation * name="user-auction" * role-name="user-has-auction" * target-multiple="yes" * * @ejb.value-object * compose="com.ectropic.auctionhopper.core.AuctionTO" * compose-name="AuctionTO" * members="com.ectropic.auctionhopper.cmp.interfaces.AuctionLocal" * members-name="Auction" * relation="external" * type="java.util.Collection" * */ public abstract java.util.Collection getAuctionLocals(); public abstract void setAuctionLocals(java.util.Collection auctionLocals);
Auction Bean: /** * * @ejb.relation * name="user-auction" * role-name="auction-has-user" * target-multiple="yes" * * @jboss.relation * fk-constraint="true" * fk-column="user_id" * related-pk-field="id" * * @ejb.value-object * compose="com.ectropic.auctionhopper.core.UserTO" * compose-name="UserTO" * members="com.ectropic.auctionhopper.cmp.interfaces.UserLocal" * members-name="User" * relation="external" * */ public abstract UserLocal getUserLocal(); public abstract void setUserLocal(UserLocal userLocal);
Please help. I have tried everything, read tons of xdoclet-user posts, and beat my head against the wall.
Thanks.
-James
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
