My two cents ...

Putting checks in the EJB's will give you much better information on 
exactly what has gone wrong.  Adding checks in the DB as well can't hurt, 
but without the EJB checks it might be hard to know what action to take in 
the face of a generic SQL error.

Nick Newman

At 01:11 PM 2/22/01 -0500, you wrote:

>The search engine is back up.  Here is the start of the
>thread on database constraints vs. ejb constraints:
>
><http://archives.java.sun.com/cgi-bin/wa?A2=ind0007&L=ejb-interest&P=R49824 
 >>http://archives.java.sun.com/cgi-bin/wa?A2=ind0007&L=ejb-interest&P=R49824
>
>There seems to be some smart-ass named "Robert Krueger"
>who thinks he knows all the answers :) :) :)
>
>Thanks Robert!
>
>-tim
>
> > -----Original Message-----
> > From: Robert Krueger 
> [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 22, 2001 4:42 AM
> > To: Orion-Interest
> > Subject: RE: No influence on CMP 2.0 getter setter methods - a feature
> > or abug?
> >
> >
> > 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