geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher James Blythe (JIRA)" <>
Subject [jira] Commented: (DAYTRADER-56) Register of duplicate userid in EJB 3 mode not handled correctly
Date Wed, 03 Oct 2007 20:41:51 GMT


Christopher James Blythe commented on DAYTRADER-56:

Spoke to some of the JPA developers and got the skinny on exceptions thrown by the persist
method. According to them, 
the EntityExistsException during persist() will only happen if the Entity already exists in
the PersistenceContext. Otherwise, the only way to detect this condition is at flush/commit
time (which occurs once the session bean method completes).

Consequently, the only graceful way to do this is to check and see if an entity with the same
ID exists prior (using the find() method) prior to calling persist().

> Register of duplicate userid in EJB 3 mode not handled correctly
> ----------------------------------------------------------------
>                 Key: DAYTRADER-56
>                 URL:
>             Project: DayTrader
>          Issue Type: Bug
>          Components: EJB Tier
>    Affects Versions: 2.0
>            Reporter: Christopher James Blythe
> If you attempt to register a userid that already exists in the database, the resulting
error is not handled gracefully. In Direct mode, we catch the resulting DuplicateKeyException
and ensure that a warning is propagated to the web-tier (by displaying a message on the register
> The register method in the TradeSLSBBean needs to be revised to handle this gracefully.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message