On 2002.01.16 23:44:26 -0500 Bill Pfeiffer wrote:
> I will probably go ahead and check uniqueness on the setter of the field,
> but I don't like it and here's why.  Oracle has gone a long way to ensure
> that users have a consistant view of the database, my dinky check in my
> setter to see if a value is there yet lacks ANY robustness. 
mm, yes, checking yourself requires serialized transactions.  In fact this
is the first example I've seen where serialized tx have different effects
than "snapshot" type transactions such as firebird/interbase have.  Very
illuminating.

 Just because
> I
> check for uniqueness does not mean that another user will not do the same
> check before my bean actually persists. In this case my check is
> meaningless: someone will get the constraint error.  The persistance
> layer
> (Oracle) is ultimately responsible for data integrity.  I would think
> there
> would be some more reasonable method for reporting errors to the user
> involving data integrity .  Leaving my user scratching there head at an
> UndeclaredThrowableException error does not pass the test of
> reasonableness
> (?).
> 
> I agree that catching the Oracle exception and parsing to get the unique
> constraint message and reporting to my user is going break persistance
> portability, but this is a compromise I would like to be allowed to
> choose.
> 
> Bill
> 
>Now I see why. Thanks
david jencks

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to