ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Putnam <dput...@wellsfargo.com>
Subject ROLLBACK actions being seen on the database
Date Tue, 22 Feb 2005 17:03:08 GMT

I am writing a performance critical stand-alone java application using
iBatis.  I am noticing ROLLBACK actions at the database that I can't
explain, but I do have an hypothesis.

Here is a code fragment:
        boolean done = false;
        int retry = 0;
        while ((retry < maxDeadlockRetry) && !done) {
            try {
                switch (mode) {
                    case 1:
                        updateInvestor(investor, customer);
                    case 2:
                        createInvestorLink(investor, customer);
                        updateInvestor(investor, customer);
                    case 3:
                        investor = createInvestor(customer);
                        createInvestorLink(investor, customer);
                done = true;
            } catch (SQLException e) {
            } finally {
                try {
                } catch (SQLException e) {
            } // end of try
        } // end of deadlock retry

I think that even though the transaction is committed, the endTransaction
issues a ROLLBACK to the data server.  No data is lost because it has been
committed, but this incurs another round trip to the data server.  I tried
to be more explicit about when a rollback should occur, but I found trouble
returning connections to the pool without the endTransacction in the finally

Is this working as designed?  

David Putnam
Wells Fargo Funds Management, LLC
One Hundred Heritage Reserve
Menomonee Falls, WI 53051-4400
MAC:   N9882-030
Voice: 414-359-3678

This transmission may contain information which is confidential, proprietary
and privileged.  If you are not the individual or entity to which it is
addressed, note that any review, disclosure, copying, retransmission or
other use is strictly prohibited.  If you received this transmission in
error, please notify the sender immediately and delete the material from
your system.  This transmission is for informational purposes only, and is
not intended as an offer or solicitation for the purchase or sale of any
financial instrument or as an official confirmation of any transaction.  Any
information regarding specific investments or other products is not
warranted as to completeness or accuracy and is subject to change without

View raw message