Floyd,
I don't see a problem with Dan's method. I assume from the SQL that he is using Oracle.
Sequence.NextVal will never return the same sequence number twice, regardless of the
transaction context. This is how sequences were designed to be used. However, there is
no guarantee that the numbers will be sequential :)
--Victor Langelo
Floyd Marinescu wrote:
> >I'm not sure that this is actually the case, but that's what appears to be
> >happening when I walk through it in the debugger.
>
> Dan, you may want to try some load testing, try to create as many of that
> enity type as you can, that way you may encounter the problem where another
> bean gets added to the database before the first can get the last sequence
> count.
>
> The only way that your scheme could work is if ejbCreate is a serializeable
> transaction, althouh I doubt that it is.
>
> take care,
>
> Floyd
>
> ---------------------------------
> Senior Architect
> The Middleware Company
> http://www.middleware-company.com
> [EMAIL PROTECTED]
> 416-889-6115
>
> Need help with EJB / J2EE? Ask about our on-site training and consulting
> services.
>
> ===========================================================================
> 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".