Re: [Topia-devel] [Topia-commits] r2356 - trunk/topia-persistence/src/main/java/org/nuiton/topia/framework
On Sun, 16 Oct 2011 22:08:41 +0200 (CEST) echatellier@users.nuiton.org wrote: Attention, il faudrait peut-être faire ça mais en reposionnant le connection comme elle était avant, non ? Là en by-pass les commits gérés via hibernet et donc topia. Il me semble plus prudent de faire ça : try {} finally { //On remet comme avant } Ce qui me dérange aussi c'est qu'il n'y ait aucun test pour ça :( Merci de faire le nécessaire pour que la modification soit très locale et ne se propage pas sur la transaction. Tony.
Author: echatellier Date: 2011-10-16 22:08:41 +0200 (Sun, 16 Oct 2011) New Revision: 2356
Url: http://nuiton.org/repositories/revision/topia/2356
Log: Fix h2 restore clustering bug
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2011-10-14 14:08:09 UTC (rev 2355) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2011-10-16 20:08:41 UTC (rev 2356) @@ -1355,8 +1355,14 @@ in.close(); } + // FIXME echatellier 20111016 : fix runscript failure in h2 + // due to change in clustering between version 1.2.142 and 1.2.143 + // "Cluster: auto-commit was disabled after opening a connection." + getHibernate().connection().setAutoCommit(true); + SQLQuery query = getHibernate().createSQLQuery( "RUNSCRIPT FROM '" + file.getAbsolutePath() + "'" + options); + query.executeUpdate();
// send event AFTER restore
_______________________________________________ Topia-commits mailing list Topia-commits@list.nuiton.org http://list.nuiton.org/cgi-bin/mailman/listinfo/topia-commits
-- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 email: chemit@codelutin.com http://www.codelutin.com
Le 16/10/2011 22:32, Tony Chemit a écrit :
On Sun, 16 Oct 2011 22:08:41 +0200 (CEST) echatellier@users.nuiton.org wrote:
Attention, il faudrait peut-être faire ça mais en reposionnant le connection comme elle était avant, non ?
Là en by-pass les commits gérés via hibernet et donc topia.
Il me semble plus prudent de faire ça :
try {} finally { //On remet comme avant }
Ce qui me dérange aussi c'est qu'il n'y ait aucun test pour ça :(
Merci de faire le nécessaire pour que la modification soit très locale et ne se propage pas sur la transaction. FIXME retiré, problem solved ;)
-- Éric Chatellier <chatellier@codelutin.com> Tel: 02.40.50.29.28 http://www.codelutin.com
participants (2)
-
Eric Chatellier -
Tony Chemit