S
Sid Eaton
It's not clear from all the documentation I've read what constitutes a
reason for JSTL to decide to rollback a transaction.
For instance, I'd like to:
<sql:transaction isolation="serializable">
<sql:select>
select a counter value from a table based on some criteria FOR
UPDATE
</sql:select>
<sql:update>
update some other table based on the retrieved value above
</sql:update>
<sql:update>
update the counter value in the original table by one
</sql:update>
</sql:transaction>
sql:transaction doesn't seem to have any explicit commit or rollback
mechanism that one could manipulate in a c:if.
If we have to depend on sql:transaction to "make up its own mind"
about success or failure to determine if a commit or rollback is
appropriate, then what constitutes conditions for rollback?
For instance, if I do a SELECT ... FOR UPDATE as above and get back
zero rows, I don't want to continue the transaction, but it seems that
JSTL considers this a successful operation since no failure occurred
[returning zero rows is not a failure].
Also, if I want to prevent the web user from receiving SQL errors by
surrounding the sql:select and sql:update in a c:catch, then how
could I force a rollback?
reason for JSTL to decide to rollback a transaction.
For instance, I'd like to:
<sql:transaction isolation="serializable">
<sql:select>
select a counter value from a table based on some criteria FOR
UPDATE
</sql:select>
<sql:update>
update some other table based on the retrieved value above
</sql:update>
<sql:update>
update the counter value in the original table by one
</sql:update>
</sql:transaction>
sql:transaction doesn't seem to have any explicit commit or rollback
mechanism that one could manipulate in a c:if.
If we have to depend on sql:transaction to "make up its own mind"
about success or failure to determine if a commit or rollback is
appropriate, then what constitutes conditions for rollback?
For instance, if I do a SELECT ... FOR UPDATE as above and get back
zero rows, I don't want to continue the transaction, but it seems that
JSTL considers this a successful operation since no failure occurred
[returning zero rows is not a failure].
Also, if I want to prevent the web user from receiving SQL errors by
surrounding the sql:select and sql:update
could I force a rollback?