If what you are getting back is not an EJB then it will behave normally. If
it is an EJB then it won't unless you explicitly code it (*and*, this is the
real killer, its parent) to work like that.
-----Original Message-----
From: Sacha Labourey [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2001 09:14
To: jBoss
Subject: RE: [jBoss-User] IsA behaviour when inheriting beans
Hello Edward,
Thank you for your reply. I admit that the EJB spec does not support
"component inheritance". What I am trying to figure out is how standard Java
inheritance can be used withing EJB.
My main interrogation is about the serialized proxy that is returned back to
the client code. Does this proxy accuratly knows its class type? i.e. if a
get back a base class type from a method call and this object is a proxy for
an EJB, may I call instanceof on it to get information on its real target
class? (i.e. more usable example below in my previous e-mail)
I understand this behaviour as not being directly "component inheritance"
but rather more standard java inheritance behaviour.
Do you follow me ?
Cheers,
Sacha
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Kenworthy, Edward
> Envoyé : lundi, 5 février 2001 09:25
> À : 'jBoss'
> Objet : RE: [jBoss-User] IsA behaviour when inheriting beans
>
>
> Inheritance isn't supported by the EJB spec'. You can get a sort of
> fake-inheritance running BUT it will be very inconsistent (eg
> sometimes the
> inheritance will work as expected sometimes it won't.) Personally I would
> avoid it.
>
> -----Original Message-----
> From: Sacha Labourey [mailto:[EMAIL PROTECTED]]
> Sent: 02 February 2001 10:50
> To: jBoss
> Subject: [jBoss-User] IsA behaviour when inheriting beans
>
>
> Hello,
>
> I've got some questions regarding inheritance in Jboss.
>
> Imagine these RI:
> - interface ABusiness ...
> - interface A extends ABusiness, EJBObject ...
>
> a son of A:
> - interface B1Business extends ABusiness ...
> - interface B1 extends B1Business, A ...
>
> another son of A, brother of B1:
> - interface B2Business extends ABusiness ...
> - interface B2 extends B2Business, A ...
>
>
> If I have a method of antoher Bean which returns a base class A, is it
> possible to use a instanceOf behavior on the client side to decide which B
> it is:
>
> A = myOtherBean.getBObject (); // return type is A
> if (A instanceof B1) ...
>
>
> In the same way, what about returned sequences?
>
> mySequence = myOtherBean.getManyObjects (); // a sequence of base
> interface
> A
> if (mySequence.elementAt(0) instance of B1)...
>
>
> Does this works automagically? Will the client side proxy knows
> its accurate
> distant object type?
>
> thank you. Cheers,
>
>
>
> Sacha
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]