You helped me find it.  In 9.4.3:

"A dependent object class must not be exposed through
the remote interface..."

and

"A dependent _value_ class ... may be a class the bean
provider chooses to expose through the remote interface..."

That pretty much answers it.  Am I the only person who
thinks this is stupid?  If you want access to a dependent
object, you have to write two classes: the abstract
dependent object class and the concrete dependent value
class.

-tim


> -----Original Message-----
> From: John D'Ausilio [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 26, 2000 3:26 PM
> To: Orion-Interest
> Subject: RE: can client see dependent objects (ejb2) ?
> 
> 
> I believe you must use a Dependent Value class to get 
> dependent objects ..
> the idea with dependents is that they are tightly associated 
> with an entity,
> and the entity should use them and expose in it's own 
> interface .. see the
> ejb spec 9.3.1 on granularity, and dependent objects and 
> value objects in
> 9.7.x
> 
> jd
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Drury
> > Sent: Thursday, October 26, 2000 1:05 PM
> > To: Orion-Interest
> > Subject: can client see dependent objects (ejb2) ?
> >
> >
> >
> > I save successfully saved an ejb w/ dependent object
> > into the database.  But when I try to pull the ejb
> > back (w/dependent object), the client throws an
> > exception saying it cannot find the dependent object
> > class.
> >
> > Client code snippet:
> >
> >   system.out.println(contact.getName());  // this works
> >   Address a = contact.getAddress();  // this throws exception
> >
> > The ejb attributes print out on the screen
> > fine, but when I try to get the Address
> > dependent object the *client* throws this
> > exception:
> >
> > java.lang.ClassNotFoundException: Address_Dependent0
> >
> > Now, I think the problem is obvious.  My class
> > is called "Address" and Orion compiled the class
> > on the server and called it "Address_Dependent0".
> > Obviously, the client isn't going to see that.
> >
> > My question: Can the client not see dependent objects
> > at all?  Should I write another Address class and
> > copy all the dependent Address class attributes into
> > it?
> >
> > Is this addressed in the spec (I didn't see it)?
> > I hope this is how it is supposed to work, I sure hope
> > they change it - it seems a huge waste of time to
> > have to write 2 classes for each dependent object.
> >
> > -tim
> >
> 
> 

Reply via email to