postgres jdbc transaction problem surfaces at times

Поиск
Список
Период
Сортировка
От kevin@mtel.co.uk
Тема postgres jdbc transaction problem surfaces at times
Дата
Msg-id 1144856469.014948.89160@j33g2000cwa.googlegroups.com
обсуждение исходный текст
Ответы Re: postgres jdbc transaction problem surfaces at times  (Mark Lewis <mark.lewis@mir3.com>)
Список pgsql-jdbc
i read in the posts here that postgres 8.0 jdbc had unmasked it;s
dislike of changing transaction level mid transaction so i changed my
code to the following

is this set up correct?

        try {
            livedb.setAutoCommit(false);
            copydb.setAutoCommit(false);


livedb.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);

            copydb.setTransactionIsolation
(Connection.TRANSACTION_SERIALIZABLE);

            // series of writes to both db's

            livedb.commit();
            livedb.setAutoCommit(true);
            copydb.commit();
            copydb.setAutoCommit(true);

        } catch (SQLException sqle){
                // run a rollback-Release and log it routine;

                // crash and burn;
        }

this seems to work fine single user, but with several users on i get
occasional dumps with
transaction change in transaction.

the only code to change relates to the LUW start since the last rollout
of this servlet and there was never this problem before.
the connections are stored as a session attribute, so persist across
requests.


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: No automatic reconnect after network error
Следующее
От: Mark Lewis
Дата:
Сообщение: Re: postgres jdbc transaction problem surfaces at times