0 Replies Latest reply on Jan 31, 2004 5:26 PM by b_boyle18

    Getting a Local Reference: CMR

    b_boyle18 Newbie

      Hi!

      I am trying to get an example of CMR up and running. I have all my beans coded correctly and my deployment descriptor is fine. I have 2 entity ejb's: Constituency and Candidate. It is a one-to-many relationship. A Constituency can have many candidates but a candidate can only have one constituency.
      What I'm not sure about is how to create a new Candidate. I must have a reference to ConstituencyLocal in the ejbCreate method. But how do I get the reference to the ConstituencyLocal object? I am looking at the O'Reilly book - Enterprise Javabeans, and from that I think I have to do something like this:

      ConstituencyLocal const = "get ConstituencyLocal reference"

      CandidateLocal candidate = cadidateHomeLocal.create( cand_id, name, const );

      How do I get the ConstituencyLocal reference?
      All I want is the const_id of the current constituency so that I can add it to my ejbcreate method. How do I get just the const_id?

      Thanks for your help,
      B