Doesn't the use of the Address dependent object in the Person remote
interface violate section 9.4.11 of the EJB2.0 spec?  Specifically:

-----
The Bean Provider must not expose the dependent object classes or the
persistent Collection classes that are used in container managed
relationships through the remote interface of the bean.

This means that the get and set methods of the entity bean's abstract
persistence schema must not be exposed through the remote interface of
the entity bean except in the following cases:
* When the relationship is defined as a one-to-one or many-to-one
relationship between two entity beans.
* When the get and set accessor methods are methods for a cmp-field. Set
accessor methods cor-responding to primary key fields, however, should
not be exposed in the remote interface of the bean.
-----
and...
-----
Although dependent object classes cannot be exposed in the remote
interface, the Bean Provider can use the accessor methods to obtain
instances of these persistent classes (including the collection classes
that correspond to relationships), and can copy data to or from these
instances to instances of the classes that are exposed in the remote
interface.
-----

Unless I'm mistaken (no way, never happens :-), you need to copy the
Address data to a detail object before returning it.

Jeff

> -----Original Message-----
> From: Nick Newman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 20, 2000 3:02 PM
> To: Orion-Interest
> Subject: Re: How to use EJB2.0 on Orion
> 
> 
> I gather the ATM EJB 2.0 app is out now - but perhaps a very 
> simple app
> will still be useful.  See attached.
> 
> The only problem I have had with EJB 2.0 in Orion is trying 
> to do a 1-1
> mapping to a dependent class.
> 
> Nick

Reply via email to