What do you mean by a curcular cmr?
If I understand it: making relation from one Entity CMP Bean to itself? I think it is a good question. I've got the same problem. (I need object tree) Is it possible?
It works fine for me. Are you using RC1?
Im using rc1 with Postgresql. I have ProductEJB that references itself. Ive tried the first 3 commit options (A,B,C) and several different combinations of transactions. I have tried passing the pk of the child to the parent where the parent does a lookup and gets an instance to the child, then sets the CMR field. Ive also tried just creating my parent first, then from the slsb calling the setCMR field on the parent with a local reference to the child
My environment is the default (without tomcat), with the exception of postgres.
My design is application -> remotesession -> localentity
How are your beans designed/configured?
I can actually post the code sometimes tonight when I get home.
Say you have an emplyee has a supervisor and subordinates relationship. You would have the folling accessors int the employee object
public abstract Employee getSupervisor(); public abstract void setSupervisor(); public abstract Collection getSubordinates(); public abstract void setSubordinates();
Right? Declare the relationship in the ejb-jar.xml file.
Then in your client code you do the following:
Employee myBoss = EmployeeHome.creat("Boss"); Employee me = EmployeeHome.creat("Boss"); me.setSupervisor(myBoss);
Of course you have to do this on the serverside. Just put the code in a session bean.