Or.. you could use TopLink For Weblogic to do real mapping of dependant
objects.
Or in fact use one of several App Servers which support mapping of dependant
objects from within
a CMP bean, some of these make use of Weblogic as well: PowerTier,
Websphere, Voyager Application Server, etc.
Jon
-----Original Message-----
From: Dan Weimer [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 20, 2000 9:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Entity and Dependent
If you really, really want to use CMP with a dependent object in an entity
bean, consider the following steps.
* Define a byte[] field in the CMP entity bean sufficient to hold the
dependent object in serialized form
* in ejbStore(), serialize the dependent object to the byte array
* Container stores byte array to database column. Dependent object is not
mapped, only the byte array is.
......
* Container loads cmp fields from database - including byte array
* your ejbLoad() processes serialized object and writes to dependent object
In other words, use ejbLoad and ejbStore to transform the dependent object
into a form compatible with weblogic's simple container managed persistence
capability.
If you can convert the dependent object to/from a string, you can use that
instead of a serialized object.
There is definitely a performance hit with this approach but it does allow
the use of CMP.
- Dan
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Shiv Kumar
Sent: Monday, November 20, 2000 1:28 AM
To: [EMAIL PROTECTED]
Subject: Re: Entity and Dependent
Christopher
Ive worked only with Weblogic 5.1. With Weblogic, it is not possible
to implement an Entity bean with dependant object as a CMP bean. You
should have to go for BMP.
Regards.
--
shiv
[EMAIL PROTECTED]
Christopher Cobb wrote:
If I have an entity with an internal dependent object, am I correct
in
understanding that this has to be implemented using bean-managed
persistene in EJB 1.1?
=====
shiv
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.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".