Weblogic's example does not illustrate a good way to generate primary
keys. It relies on incrementing static variables for the keys. The use
of non-final static variables is prohibited by the ejb spec. Beside the
problem with rollbacks, this will not work in a clustered environment.

I've already posted this problem to the weblogic ejb news group and the
engineer monitoring the group agreed that the example is bad. I'm
surprised that it is still on the website.

I'm afraid this doesn't answer your question, but weblogic's example is
a bad place to start for solving the primary key question.

Carles

Philippe Renon wrote:
>
> Hi,
>
> I'm using a method taken from a BEA WebLogic example to generate new primary
> keys for my entity beans.
> The example is at
> http://www.weblogic.com/docs/examples/ejb/sequence/jdbc/index.html

(rest of message removed to save space)

> Philippe Renon
> d�calog - 5, rue Bachaumont - 75002 PARIS
> Voice   : +33 (0) 1 40 28 44 64
> Fax             : +33 (0) 1 40 28 24 54
> E-mail  : mailto:[EMAIL PROTECTED]
>
> ===========================================================================
> 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