EJB 1.1 contract for CMP states:

The following requirements ensure that an EJB 1.1 entity bean with
container-managed persistence can
be deployed in any compliant container.
. The Bean Provider must ensure that the Java types assigned to the
container-managed fields are
restricted to the following: Java primitive types, Java serializable types, and
references of
enterprise beans' remote or remote home interfaces.
. The Container Provider may, but is not required to, use Java Serialization to
store the con-tainer-
managed fields in the database. If the container chooses a different approach,
the effect
should be equivalent to that of Java Serialization. The Container must also be
capable of per-sisting
references to enterprise beans' remote and remote home interfaces (for example, by
storing their handle or primary key).

Serializable fields are perfectly legitimate for EJB 1.1 CMP.

Ashwani Kalra wrote:

> EJB 1.1 cannot directly handle such user defined types properly . You can
> either use BMP and write the sqls your self. Or you can have mix behaviour
> CMP + BMP. do not declare the field which is giving problem and handle it in
> your sql query in the call back methods.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Cheers
> Ashwani Kalra
> Sr. Mem. Dev. Staff
> Aithent Technologies
> India
> http://www.geocities.com/ashwani_kalra/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Raymond Blum
> Sent: Saturday, November 10, 2001 4:26 AM
> To: [EMAIL PROTECTED]
> Subject: CMP of (user defined) Serializable types?
>
>
> I am porting an application from Sun's J2EERI to WebLogic 6.1. The
> application includes several Entity Beans using CMP which persist attributes
> of user defined types (i.e. "Schema").  These types all implement the
> java.io.Serializable interface and thus (I believe) can be persisted to the
> database (i.e. Oracle "LONG RAW" columns, they were CloudScape LONG BIT
> columns in the J2EERI implementation).
>
> When I try to declare any of these attributes as CMP fields, ejbc complains
> that the type ("Schema") is not supported in WLS EJB 1.1.
>
> 1)  Is support for these available only in the 2.0 spec? If so, can anyone
> point me at a good example of the WLS 6.1 deployment process (Descriptors,
> etc). It looks like all of the BEA samples are EJB 1.1.
>
> 2) Can CMP support for any Serializable class be acheived in an EJB 1.1
> deployment?
>
> TIA
> ---Raymond
>
> ===========================================================================
> 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".
>
>
>
>


--
_______________________________________________________________________________

Evan Ireland            Sybase EAServer Engineering         [EMAIL PROTECTED]
                           Wellington, New Zealand                +64 4 934-5856

===========================================================================
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