>>Here's the problem : must i use taxon or taxonbean for parent
>>and child in my taxonbean class ?
You should use Taxon.
>>If i use taxon, i don't have access to taxonbean classes not part of th
>>interface.
That's the whole point of the exercise. Write accessor functions to provide
access to TaxonBean members.
>>If i use taxonbean, how to cast then to taxon before returning ?
You can't cast an implementation class to its remote interface, unless you
make the implementation class explicitly implement the remote interface
(not recommended by the EJB spec). Remember, the implementation class is
not necessarily in the same process space as the remote interface.
Joe
-----Original Message-----
From: Guillaume Rousse [SMTP:[EMAIL PROTECTED]]
Sent: Sunday, February 27, 2000 9:02 PM
To: [EMAIL PROTECTED]
Subject: An bean returning another bean
I've got a design problem with a bean returning another bean (of the same
type
moreover, but i don't think it's the problem).
Here's my taxon.java :
public interface Taxon extends EJBObject {
...
public Taxon getParentTaxon() throws RemoteException;
public Set getChildTaxons() throws RemoteException;
}
And some of my taxonbean.java :
public class TaxonBean implements EntityBean {
...
public TaxonBean parentTaxon;
public Set childTaxons;
public Taxon getParentTaxon() throws RemoteException {
return parentTaxon;
}
public Set getChildTaxons() {
return childTaxons;
}
}
Here's the problem : must i use taxon or taxonbean for parent and child in
my
taxonbean class ?
If i use taxon, i don't have access to taxonbean classes not part of the
interface. If i use taxonbean, how to cast then to taxon before returning ?
Thanks for your help
--
Guillaume Rousse
Iremia - Universite de la Reunion
15 avenue Rene Cassin, BP 7151
97715 Saint Denis, messagerie cedex 9
Tel:0262938330 Fax:0262938260 ICQ:10756815
BRIDGEKEEPER: What... is the air-speed velocity of an unladen swallow?
ARTHUR: What do you mean? An African or European swallow?
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".