>
> SqlSession sql_session = sqlSessionFactory.openSession(false);
> ....
> sql_session.commit();
>
>
We'll presume that you intend (intentionally or otherwise) for auto-commit
to be on since you do not reference any actual JDBC method calls here...
> While for "8.4-702 JDBC 4", the same codes, no error at all.
>
> Is this a bug for "postgresql-9.0-801.jdbc4.jar"?
>
> Thanks a lot!
> Emi
>
Arguably 8.4-702 was the bugged version and 9.0-801 corrects the behavior -
or rather enforces the fact you should not be in auto-commit mode AND
committing manually. Since this is a major version change such a behavioral
change is to be expected. It should also at least be documented - but
whether it is or not I do not know.
I would recommend disabling auto-commit and leaving your commit() calls in
place. You are generally much better off dealing with transaction logic
explicitly instead of relying upon the driver to do it for you; though there
are always exceptions but you should code is so that you can request an
auto-commit session when you know you need one.
David J.