The CMP engine should check whether a duplicate key exists before
attempting to insert the record and report the proper
DuplicateKeyException. If it tries to insert first there's no hope for
it reporting the proper exception.
arkin
Nitin Mangtani wrote:
>
> hi all,
>
> I have developed a simple Entity Bean CMP, which inserts record in employee
> table, if i try to insert a duplicate record it gives throws a RemoteException to
> the client.
> "java.rmi.RemoteException: Unexpected error in create: java.sql.SQLException:
> ORA-00001: unique constraint (SCOTT.EMP_PK) violated"
> How do make my Entity bean to throw DuplicateKeyException to the client. I am using
> Weblogic App. Server.
>
> Regards,
> Nitin.
>
> **************************************************************
> Nitin R Mangtani
> Senior Software Engineer-Enterprise Solutions
> Wipro Technologies
> 72, Keonics, Electronics City,
> Hosur Main Road,
> Bangalore-561 229, India
> Tel: 91-80-8520416/9 Extn. 1207
> Fax: 91-80-8520478
> E-mail:[EMAIL PROTECTED]
> www.wipro.com
> The World's First SEI CMM Level 5 Software Services Company
> **************************************************************
>
> ===========================================================================
> 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".
--
----------------------------------------------------------------------
Assaf Arkin www.exoffice.com
CTO, Exoffice Technologies, Inc. www.exolab.org
===========================================================================
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".