[open-ils-commits] r15919 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 19 16:58:20 EDT 2010
Author: miker
Date: 2010-03-19 16:58:14 -0400 (Fri, 19 Mar 2010)
New Revision: 15919
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage.pm
Log:
pull the query parser implementation in at startup
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage.pm 2010-03-19 15:36:13 UTC (rev 15918)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage.pm 2010-03-19 20:58:14 UTC (rev 15919)
@@ -13,6 +13,7 @@
# the easy way to get to the logger...
my $log = "OpenSRF::Utils::Logger";
+our $QParser;
our $WRITE = 0;
our $IGNORE_XACT_ID_FAILURE = 0;
@@ -24,10 +25,9 @@
$log->debug('Initializing ' . __PACKAGE__ . '...', DEBUG);
- my $driver = "OpenILS::Application::Storage::Driver::".
- $conf->config_value( apps => 'open-ils.storage' => app_settings => databases => 'driver');
+ my $db_driver = $conf->config_value( apps => 'open-ils.storage' => app_settings => databases => 'driver');
+ my $driver = "OpenILS::Application::Storage::Driver::$db_driver";
-
$log->debug("Attempting to load $driver ...", DEBUG);
$driver->use;
@@ -64,7 +64,17 @@
if (OpenILS::Application::Storage::CDBI->db_Main()) {
$log->debug("Success initializing driver!", DEBUG);
- return 1;
+
+ my $db_driver = $conf->config_value( apps => 'open-ils.storage' => app_settings => databases => 'driver');
+ $QParser = 'OpenILS::Application::Storage::Driver::'.$db_driver.'::QueryParser';
+ $QParser->use;
+
+ if($@) {
+ $log->debug( "Can't load $QParser! : $@", ERROR );
+ $log->error( "Can't load $QParser! : $@");
+ } else {
+ return 1;
+ }
}
$log->debug("FAILURE initializing driver!", ERROR);
More information about the open-ils-commits
mailing list