Bobby Lawrence wrote:
It seems that my database has triggers on it that insert the nextval
from the sequence upon insert.
So OJB determines the sequence, and then Oracle does the same thing.
Thats why my sequences are being called twice...
Also beware of Oracle sequence caching if your Oracle-server is sometimes
shut down between application runs. (Ie not an issue in production
environements,
primarily if you are developing with a local Oracle instance.)
A default Oracle sequence without any caching flags will grab ~20 numbers
at a time and cache them in Oracle kernel for better performance.
(Not unlike OJB hi/lo SequenceManager, but with the crucial difference that
this in-memory cache survives client-side JVM shutdown.)
To avoid this even when using a server that shuts down frequently, you can
(at the expense of some Oracle kernel I/O-cycles) use the following SQL
to create the sequence:
CREATE SEQUENCE seq_name START WITH initial_value NOCACHE;
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]