aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Call EntityManager remove operation for removed entity. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Call EntityManager remove operation for removed entity." Watch "Call EntityManager remove operation for removed entity." New topic
Author

Call EntityManager remove operation for removed entity.

Czeslaw Szczotka
Greenhorn

Joined: May 16, 2010
Posts: 8
Hi,
On Mikalai Zaikin's page http://java.boot.by/scbcd5-guide/ch06.html is described EntityManager remove operation.
For entity in removed state is sentence : "If A is a REMOVED entity, it is IGNORED" .
Is it correct ? Seems that for such situation we get IllegalStateException.

Thanks,
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

According to the specification (and that's where the guide you're using took the information from), invoking remove on a removed entity will be ignored.

3.2.2 Removal
If X is a removed entity, it is ignored by the remove operation.


[My Blog]
All roads lead to JavaRanch
 
 
subject: Call EntityManager remove operation for removed entity.