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]