At 14:54 22.02.2001 , you wrote:
>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

very true. that's why I would regard DB constraints only as an additional 
security measure to protect your data model integrity. depending on your 
jdbc driver the SQLException's error message can give you some information 
during development. however, if your client code has to react to the fact 
that a unique constraint on a non-pk key has been violated you have no 
choice but to put that check into the EJB tier and I would also generally 
regard that as better style.

regards,

robert

(-) 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