Hello,

as Eric Samson said, bean inheritance is not part
of any version of the EJB specification.
With the current version of JOnAS, the only thing you
can do is bean implementation inheritance, for code sharing/reuse
purpose, and also for building an EJB component from an existing
class.
The principle is to implement the state and the business methods
of your entity bean in a class from which your bean implementation
will inherit. Your bean implementation FooBean will only contain
the EJB specific methods (ejbCreate, ...), while your business methods
will be in a class FooImpl. FooBean inherits from FooImpl.
This allows to have an inheritance tree of <class>Impl classes,
thus the business code of your beans may be shared/reused. Using
this model you may also build a bean from an existing <class>Impl.
However the beans themselves will not inherit.

  Example (don't know what this ascii schema will look like
                 when you receive the e-mail ...):

                              Top [id, name]
                               |
                               |
                               |
                              PersonImpl [age, setAge(), getAge()]
                             /        \
                            /          \
                           /            \
                      PersonBean         \
                Person (Remote)           \
                PersoneHome                \
                 \
                                         UserImpl [password,
changePassword(),
                                         /         getPassword()]
                                        /
                                       /
                                   UserBean
                           User (Remote)
                           UserHome

UserImpl inherits from PersonImpl, PersonBean inherits
from PersonImpl, UserBean inherits from UserImpl, but
UserBean does not inherit from PersonBean.

Regards,

François

Honoria Sauciuc wrote:

> Hi!
> I am doing a research for the best EJB container that
> would fit my needs and I have a question I would like
> to know the answer to, because I don't have the time
> to test it my self. I am sorry if I didn't know where
> to search to the answer but I didn't find the part of
> docs that would clear this in my mind. Here it is:
>
> I hear some EJB containers does not support IsA type
> inheritance for Container Managed Persistence Entity
> Beans. Is it really a container problem or a CMP 1.1
> specification one? Does Jonas support such inheritance?
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

--
==================================================================
Francois EXERTIER         Evidian (Groupe Bull)
     1, rue de Provence,  BP 208,  38432 Echirolles cedex, FRANCE
     mailto:[EMAIL PROTECTED]
     http://www.evidian.com/jonas   http://www.objectweb.org/jonas
     Tel: +33 (0)4 76 29 71 51  -  Fax:   +33 (0)4 76 29 76 00
==================================================================


----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to