Re: ORA-0060 (database deadlock) with Weblogic CMP EJB
Juan Pablo Lorandi <[email protected]>
| Newsgroups | gmane.comp.java.sun.ejb.general |
|---|---|
| Organization | CodeFoundry LTD |
| Message-ID | <006401c38e7f$593fa580$0a00a8c0@rifle> |
> 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".