You can't use relationship outside the deployment (i.e ejb-jar.xml) scope
which has defined it.
 
The common solution is to use value objects to export data for client :
 
simple java classes that reflects beans
 
class DogVO { ... }
class OwnerVO { ... DogVo dog; ... }
 
and usually you put an accessor for getting VO in an session bean
like :
 
OwnerVO getOwner(int ownerId) { ... }
 
Julien
----- Original Message -----
Sent: Wednesday, July 31, 2002 10:59 AM
Subject: [JBoss-user] CMR & local interfaces

Hi,
 
I am a newbie in EJB 2.0, and I don't understand how to
access to my relations from the client side (because
relationships seem to work with local interfaces only)
 
I have 2 entity bean : 'owner' and 'dog', and a one-to-one
relationship between themselves : a dog has one owner, and
one owner has (only) one dog.
 
In my OwnerBean class, I define a getDog() method which
return a DogLocal interface, so I can't get it from my client !
 
How can I do ?
 
Thanks
 
Sebastien CHAUSSON

Reply via email to