Mike,

Following an EJB training course that I attended, I believe this problem is
being addressed in EJB spec 1.1,  by allowing deferring of primary key
generation until deployment time.

I think this means that the deployment descriptor for the entity bean will
be able to specify how it gets its primary key - in a DB independant way.

Check out the EJB 1.1 spec,  I would be interested to know the details
aswell !

Pete

> -----Original Message-----
> From: Mike Cannon-Brookes [SMTP:[EMAIL PROTECTED]]
> Sent: 26 November 1999 08:20
> To:   [EMAIL PROTECTED]
> Subject:      CMP and Identity Columns?
>
> G'day guys,
>
> Is it possible to implement an entity bean with CMP, that persists in a
> table where the primary key is an identity? (eg increments automatically)
>
> All the create methods I've seen have create(int ID) or somesuch - how can
> I
> write create() so that the EJB container creates the new DB record and
> reads
> in the primary key from the DB?
>
> Cheers,
> Mike
>
>  __
> |  | Director - The BookmarkBox P/L
> |  |  http://www.bookmarkbox.com <http://www.bookmarkbox.com/>
> |/\| Manage and share your bookmarks online!
>
> Do you enjoy our service? Why not tell your friends about us?
> http://www.bookmarkbox.com/email.cfm
>
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of jguich
> > Sent: Thursday, 25 November 1999 10:13
> > To: [EMAIL PROTECTED]
> > Subject: Re: State and Session Management
> >
> >
> > >>>
> > > But as a Servlet State is not maintained across across multiple
> > requests from a Client  , what is the use of Stateful Session Bean?
> > <<<
> >
> >          here would be my approach:
> >
> >      1. servlet maintains the state across multiple requests from
> > the client
> >      2. at each request, it creates a stateful session that
> > handles that request
> >      3. this SS perform the operations and returns the result to
> > the browser (via jsp)
> >
> >             hth,
> >
> >                     guich.
> >
> > ==================================================================
> > =========
> > 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".

Reply via email to