You only need to specify the primary key with primkey-field, the CMP
engine can figure out the rest.
arkin
Nitin Mangtani wrote:
>
> hi,
>
> thanks for your reply, you mean to say that is is CMP engines reponsiblity to
>check
> for duplicate key exists before
> attempting to insert the record, do I have to set some property in Deployment
>Descriptor.
> Also since I am using Weblogic App server i will try and post this question to
>weblogic
> newsgroup.
>
> Regards,
> Nitin.
>
> Assaf Arkin wrote:
>
> > 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".