Try:
http://newsgroups.borland.com/cgi-bin/dnewsweb?utag=&cmd=xsearch&group=inprise.public.appserver&key=sequence+number+generator
-jkw
Mduduzi Keswa wrote:
>
> Thanks for the posting William - could you be so kind and share Mr. Weedon's
> solution here. I couldn't finf this in the inprise newsgroup.
>
> Thanks.
>
> -----Original Message-----
> From: Louth, William (Exchange) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 25, 2000 12:58 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Who is generating the key when you are using CMP?
>
> Hi Subu,
>
> On the Inprise Application Server (IAS) newsgroup there is a post from
> Jonathan Weedon on how to solve this problem in a relatively clean manner.
>
> news://newsgroups.borland.com/inprise.public.appserver Re: oracle's seuence
> and cmp entity beans - "Jonathan K. Weedon" , 13 Apr 2000
>
> kind regards,
>
> William Louth
>
> > -----Original Message-----
> > From: Vdaygiri, Subu [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 25, 2000 5:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Who is generating the key when you are using CMP?
> >
> > I am having similar problem as yours. Any solution for CMP beans using
> > sequences from Oracle for primary key ?
> >
> > > -----Original Message-----
> > > From: Lars Hagrot [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, April 25, 2000 2:23 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Who is generating the key when you are using CMP?
> > >
> > >
> > > When you build a real system ( not a tutorial) you will recognize the
> > > problem below.
> > >
> > > If you have an Entity Bean and use CMP there must always be a unique
> > > key. Where does it come from?
> > >
> > > 1) from the "user" (and passed as parameter to the create method)?
> > > 2) from the EJB-Container or some Session bean (how does it know it is
> > > unique)?
> > > 3) from the database ( for example "max(col)" or "identity")?
> > >
> > > In 1) and 2) you can assign the key in the create method.
> > > But in 3) you must do a query or insert a row to get the key but how
> > > can I tell the Container do do that. I am supposed to assign
> > > the key in
> > > the create method.
> > >
> > > Is there any standards for this problem?
> > > Does this imply that example 3) must be implemented as BMP?
> > >
> > > What is the best solution if it has to be scalable and shall work with
> > > cluster of EJB-Servers?
> > >
> > > Regards
> > >
> > > Lars Hagrot
> > >
> > > --
> > > Lars Hagrot E-mail: [EMAIL PROTECTED]
> > > Object Technology Mentoring Phone: +46 8 50714409
> > > Enea Data AB Fax: +46 8 658 57 90
> > > Hornsgatan 166
> > > S-117 28 Stockholm
> > > Sweden
> > >
> > > ==============================================================
> > > =============
> > > 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".
> > >
> >
> > ==========================================================================
> > =
> > 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".
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
> ===========================================================================
> 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".
>
> ===========================================================================
> 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".
===========================================================================
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".