Assaf Arkin wrote:

> OrgUnits should point back to the Organization entity bean instance. You
> have two classes referencing each other.
>
> Do not use references or handles, the EJB server might replace them with
> a different instance so an OrgUnit might point to a different
> Organization at different times.

Could you be more precise?

Inside OrgUnit.java, does this mean that I should have a member variable:

  private Organization org = // whatever it's set to

...where Organization is a remote interface?  I think that's what you're saying,
and what I *hope* you're saying.  At this point I have to say that if I run into
yet another artificially imposed EJB restriction I'm going to go postal.

To recap:

> >   // Remote reference for OrganizationBean class--
> >   // the OrganizationBean class implements EntityBean.
> >   public interface Organization extends EJBObject {
> >      public OrgUnit[] getOrgUnits();
> >   }
> >
> >   public class OrgUnit {
> >
> >     // OK?  Bad?  Organization is an EJBObject.
> >     // Does this matter?
> >     private Organization org = null;
> >
> >     public OrgUnit(Organization org) {
> >       super();
> >       this.org = org; // OK?  Bad?
> >     }
> >
> >     public Organization getOrganization() {
> >       return this.org; // OK?  Bad?
> >     }
> >
> >   }

I assume you're saying that everything that is marked "OK? Bad?" above is
actually OK.

Cheers,
Laird

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to