What happens when a client calls an entity bean's home interface create() method and an entity bean already exists with that primary key, created previously by another client ?

Anil Datt

If the primary key already exists DuplicateKeyException is thrown, i.e if your Create method is defined to throw a CreateException, CreateException is thrown. DuplicateKeyException is the sub class of CreateException.

For findByPrimarykey ObjectNotFoundException is thrown, i.e if your findByPrimarykey method is defined to throw a FinderException, FinderException is thrown. ObjectNotFoundException is the sub class of FinderException.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.