[open-ils-commits] r12283 - trunk/Open-ILS/src/perlmods/OpenILS/Utils (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 24 14:06:07 EST 2009


Author: erickson
Date: 2009-02-24 14:06:02 -0500 (Tue, 24 Feb 2009)
New Revision: 12283

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
Log:
if xact_begin is called after initialization, make sure the osrf session is connected

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2009-02-24 17:28:14 UTC (rev 12282)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2009-02-24 19:06:02 UTC (rev 12283)
@@ -195,7 +195,8 @@
 # Starts a storage transaction
 # -----------------------------------------------------------------------------
 sub xact_begin {
-	my $self = shift;
+    my $self = shift;
+    $self->session->connect unless $self->session->state == OpenSRF::AppSession::CONNECTED();
 	$self->log(D, "starting new database transaction");
 	my $stat = $self->request($self->app . '.transaction.begin') unless $self->{xact_id};
 	$self->log(E, "error starting database transaction") unless $stat;



More information about the open-ils-commits mailing list