0 Replies Latest reply on Apr 13, 2002 10:55 PM by Sanjiv Bhalodia

    CMP and DB constraints

    Sanjiv Bhalodia Newbie

      JBOSS version 2.4.3
      DB PGSQL 7.1

      I have an unique constraint on a column. When I enter a non unique value for the column the server (JBOSS) throws ServerException. I don't have any code in either ejbLoad or ejbStore for the entity. How do I catch this exception?

      Work around I am using - check the db using a finder if unique then insert else inform the use.

      What is the right way to handle this? I don't like the idea of keeping the constraint and also check using finder.

      -sanjiv