Hi Edward!
We HAVE and DO the following:

Remote interface B extends A.

On the client side I can cast B to A. Works fine, even method
invocations afterward. Don't see why it shouldn't ? But I really want to
know all the problems you see. Please explain.

Cheers,
Tobias 

"Kenworthy, Edward" wrote:
> 
> Hi Shahar
> 
> Don't do it.
> 
> If you have remote interface A and create remote interface B by extending A
> then you are saying "I can use an instance of B to substitue for an instance
> A". THIS IS NOT TRUE !
> 
> EJB does not properly support inheriting of one bean from another. By which
> I mean, you can do it, BUT it will not behave as it should. (eg IsA doesn't
> work!).
> 
> If you don't care about this, ie you are using the inheritance for code
> re-use then I would do it in a different way because otherwise you would
> confuse people (inheritance in Java is about IsA behaviour not code re-use).
> I would do it by factoring out a common base (which is NOT a remote
> interface) which both A and B extend.
> 
> Edward
> 
> -----Original Message-----
> From: Shahar [mailto:[EMAIL PROTECTED]]
> Sent: 03 January 2001 17:12
> To: [EMAIL PROTECTED]
> Subject: [jBoss-User] Inheritance in CMP beans - followup
> 
> [Hi again]
> off course, I also intend to extend the remote interface. Possible ?
> 
> --
> --------------------------------------------------------------
> 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]

Reply via email to