Hi Chris,
Get use to putting business login the session beans; that's where they
should be to begin with! Or, if you're stubborn and want to stick with
entity beans, then BMP is your only alternative when you switch to 2.0
Gene Chuang
Kiko.com
-----Original Message-----
From: Chris Harris [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 5:54 AM
To: [EMAIL PROTECTED]
Subject: validation logic, value objects in CMP 2.0 entities?
I'm trying to sort out an issue with using CMP 2.0 entity
beans. It's a hypothetical question right now since I'm not
using CMP 2.0, but I am using a similar approach with
EJBDoclet and CMP 1.1
I'm starting from the assumption that in EJB 2.0, CMP
entity beans are implemented by specifing an abstract base
class containing abstract get/set methods for the beans
properties. The container generates a concrete class (or
some other approach) to do the handling of persistence.
My question is this: since these methods are abstract, how
can I validate input coming in via a setXXX() method? Does
this approach mean I can no longer put logic in my entity
beans? Does this mean I am reduced to putting a session
bean in front of the entities and putting my validation
there (ugly)?
(or am I being stupid and missing something in the spec?
I'm looking at $10.3.1 in PFD2)
As a side note, this presumably implies that value object
creation cannot now be done by tools such as EJBDoclet
since there is no code allowed in CMP accessor methods?
I've looked for answers on forums/lists etc but couldn't
find anything.
Chris Harris
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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".