Joe Gittings wrote:
> 
> I was just looking at the EJB 2.0 spec, and saw this:
> 
> "The container managed persistent fields and container managed relationship
> fields must *not* be defined in the entity bean class. From the perspective
> of the Bean provider, the container managed persistent fields and container
> managed relationship fields are *virtual* fields only, and are accessed
> through get and set accessor methods. The implementations of the container
> managed persistent fields and container managed relationship fields is
> supplied by the Persistence Manager."
> 
> I.e. in EJB 2.0 you don't code the CMP persistence fields yourself. The
> container does this. You just provide appropriately-named abstract get/set
> functions. In fact, the implementation class of a CMP entity bean should be
> abstract in EJB 2.0.
> 
> This is all great. But what I would like to ask is, will the use of
> old-style explicit CMP fields be deprecated when Jonas supports EJB 2.0? Or
> will we have to recode all our CMP entity beans to fit the new model? I
> would most definitely vote for the former! (i.e. deprecation).
> 
> Joe


Hello,

The spec EJB2.0 says "Entity beans that use the EJB 1.1 component
contract for CMP must still be supported in EJB 2.0 containers.
However the contracts are separate and the bean provider must
choose one or the other".

This means that the use of "old-style explicit CMP fields" will
still be allowed, but you will not be allowed to have in the
same bean other CMP fields managed in EJB 2.0 way !
More precisely, in your bean deployment descriptor, you will
have an element <cmp-version> indicating the version of CMP
used by the entity bean (see the deployment descriptor chapter
of EJB 2.0).

You will have <cmp-version>1.x</cmp-version> or
<cmp-version>2.x</cmp-version> (the default value !).

best Regards,

François
-- 
==================================================================
Francois EXERTIER         Evidian (Groupe Bull)
     1, rue de Provence,  BP 208,  38432 Echirolles cedex, FRANCE
     mailto:[EMAIL PROTECTED]
     http://www.evidian.com/ejb/
     Tel: +33 (0)4 76 29 71 51  -  Fax:   +33 (0)4 76 29 76 00 
     PC: B1-319        Office: B1-316 
==================================================================
----
This list is cross-posted to two mail lists.  To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".

Reply via email to