Yes I am looking for implementation inheritance, not type based polymorphism
from the client perspective

jmp

> -----Original Message-----
> From: Albert Pi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 31, 2002 1:32 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: polymorphic CMR
>
>
>
>    Inheritance is never truly with entity beans, entity beans are
> not meant to be domain objects.
>    They are meant to be components. The EJB Clients can't down/up
> cast an entity beans EJBObject stub to a parent or subclass.
>
> Albert Pi
> Corp IS System Delivery
> 516-803-3762
>
>
> >>> "J. Matthew Pryor" <[EMAIL PROTECTED]> 07/29/02 09:46PM >>>
> Hi,
>
> I can think of a whole lot of reasons why I can't do this, but lets say I
> want to try.
>
> Does anyone have any thoughts on how to get CMP EJBs to participate in
> Polymorphic relationships.
>
> Lets say I have ContainerBean & ContaineeBean
>
> I have a relationship based on the fact that a Containee is contained in
> zero or one containers, but a container can contain 0..N Containees &
> Containers (i.e. a hierarchy)
>
> So the "containee" role may point to zero or more ContainerBeans or
> ContaineeBeans (or a combination of both which is actually what I want)
>
> Even if a have ContainerBean extend from ContaineeBean, I am not
> sure I can
> make this work.
>
> My guess is I have to spoof it by actually specifying to different
> relationships and then writing code to "merge" them at runtime.
>
> I have thought of ways I might use XDoclet or other template
> systems to help
> in generating the wrapper code, making them essentially bean managed
> relationships
>
> This is probably far too OO to try & do with EJB but I am interested in
> people's thoughts on the topic and possibly any other discussions people
> know of
>
> I imagine it is possible to do my simple example some other way
> to avoid the
> problem, but lets say that I really want the feature; mostly I want it to
> support code reuse & EJB implementation inheritance.
>
> Thanks,
> Matthew
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST".  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 "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to