Re: OSSequence and transactions

"Pat Lightbody" <[email protected]>
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <03d401c30556$8fdede60$5a323680@moose>
Brian,
I believe you found the same problem I had with the Sequence module almost
two years ago. I never investigated it more, I just switched to using Oracle
sequences. If you find a patch to fix this, please let me know and I'll get
it in ASAP.

-Pat

----- Original Message -----
From: "Brian Topping" <[email protected]>
To: <[email protected]>
Sent: Thursday, April 17, 2003 3:17 PM
Subject: [Opensymphony-developers] OSSequence and transactions


OSSequence and transactionsHi all,

I'm using sequences and have some concern that I don't understand the
semantics as well as I should or there is something that ought to be fixed
in the sequence code.

The easiest case to see this in is when the sequence is used for the first
time.  The current sequence is fetched from the entity, incremented, and
that new high value stored back out.  If everything works fine at the client
level, this works great, and the entity is properly committed.  But if the
enclosing transaction fails, the entity is rolled back as well.  This seems
to be incorrect because the memory sequence is still moving forward.  When
it is time to get the next high value, the last high value is actually
retrieved, causing duplicate keys to be issued for the next high value
increment of keys.

Shouldn't the sequence session bean be set to require a new transaction such
that it will commit regardless of whether the transaction that it was called
under commits?

-b


------------------------------------------------------- This sf.net email is
sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
_______________________________________________ Opensymphony-developers
mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/opensymphony-developers



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.