At 19:16 21.02.2001 , you wrote:

hi,

check EJB-INTEREST archives for discussions on this. I think most pros and 
cons (including my view on things ;-) were in a discussion a few months ago.

at the moment the server hosting the search seems to be down, so I cannot 
give you the exact thread.

regards,

robert


>This makes we want to ask a question that has nagged me for
>a while.  Where do you put data constraints?  In the database?
>or in the entity bean?
>
>For example, let's say we have a field called "absoluteTemp"
>in Kelvin.  We all know this value can never be negative (in
>my universe anyway).  This isn't a business rule, it a law
>of nature.  Do you implement it as a database constraint which
>will throw a SQLException if violated, or do you check for
>in some facade-setter of the entity and throw some other
>Exception if violated?  What are the pros and cons of either?
>
>-tim

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de


Reply via email to