Hi,
Component Inheritance is possible in EJBs. But you have to be very careful
while doing so. Though it is always recommended that you try and avoid EJB
inheritance.
Problems that may arise while inheritance in EJBs are the parent bean class
might be returning a different PK class, while the derived bean class might
return a different PK class in the finder method and create method
implementations. Same is the case with Home Interface, where the single
return type maybe different RI.
These problems, kind of limit the applicability of OO concepts in EJBs.
Parikshit
----- Original Message -----
From: Ashwani Kalra <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 26, 2000 9:57 AM
Subject: Re: Entity Bean and inheritance
Hi,
Component inheritance is not defined by specs.But you may have
superclass for the bean class and can have ejbCreate and other business fn
in superclass. Same is the case of the interfaces. Please correct me if I am
wrong.
Regards
Ashwani Kalra
E-Comm Group
NIIT Ltd. India
> ----------
> From: Jorge Salas-Ortiz[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list for Enterprise JavaBeans development
> Sent: Tuesday, July 25, 2000 12:27 AM
> To: [EMAIL PROTECTED]
> Subject: Entity Bean and inheritance
>
> Hello all,
>
> Regarding EJB Entity beans, can I have the following:
>
> interface A extends EJBObject
> interface B extends interface A
>
> A and B are entity beans..where B maps to a DB table
> but not A. Do I need to have an ABean and AHome for
> the interface A above? I want the concrete class B to
> have BBean and BHome but not for A, A is an abstract
> class, hence it should not have a home for life-cycle
> methods, such as create().
>
> thanks..
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
> ==========================================================================
> =
> 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".
===========================================================================
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".