users@glassfish.java.net

Re: How to catch Internal Exception

From: Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 22 Jun 2007 00:32:54 +0530

That error can't be prevented by a persistence provider; such errors are
thrown by the DBMS to maintain logical integrity of the data.
You should have an error handing strategy that is suitable for your app.

-- Sahoo

glassfish_at_javadesktop.org wrote:
> For some reason, if I add a user, then try to add it again I get the correct EntiryExistsException however, if I try to add a user which exists in the database already (but say glassfish has been restarted since), I get a PSQLException saying duplicate primary key. Since this is an internal error is there any way to either catch it (which I'm guessing no), or prevent it from being able to occur?
> [Message sent by forum member 'amattas' (amattas)]
>
> http://forums.java.net/jive/thread.jspa?messageID=223370
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>