>     public Integer ejbCreateUniqueLocal(String name, String
> firstName, Character article)
>         throws CreateException {
>
>       ArtistLocalHome home = (ArtistLocalHome) ctx.getEJBLocalHome();
>
>       try {
>         home.findByNames(name, firstName, article);
>       } catch (ObjectNotFoundException o) {
>         // good, we did not find it
>         return ejbCreate(name, firstName, article);

Here, don't you intend this line directly above to be:
          return home.create(name, firstName, article);


>       } catch (FinderException f) {
>         throw new CreateException("f");
>       }

Janne, Could you explain why you catch a FinderException?

And what's the rationale for this code?
>
>       // we found it - error!
>
>       throw new DuplicateKeyException
>       ("artist already exists");
>     }
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to