deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/2] git commit: Core: Initialize sqlite3 JDBC driver properly on jRuby
Date Fri, 01 Mar 2013 16:19:41 GMT
Updated Branches:
  refs/heads/master 75e3db4c3 -> fb0f4398c


Core: Initialize sqlite3 JDBC driver properly on jRuby


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/fb0f4398
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/fb0f4398
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/fb0f4398

Branch: refs/heads/master
Commit: fb0f4398c61c07d9c49c75eec7bd560511d9a0c0
Parents: 0752515
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Fri Mar 1 17:19:05 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Mar 1 17:19:28 2013 +0100

----------------------------------------------------------------------
 server/lib/initializers/database_initialize.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb0f4398/server/lib/initializers/database_initialize.rb
----------------------------------------------------------------------
diff --git a/server/lib/initializers/database_initialize.rb b/server/lib/initializers/database_initialize.rb
index 31af21c..f7637ca 100644
--- a/server/lib/initializers/database_initialize.rb
+++ b/server/lib/initializers/database_initialize.rb
@@ -43,6 +43,11 @@ sequel_driver = (RUBY_PLATFORM=='java') ? 'jdbc:sqlite:' : 'sqlite://'
 DATABASE_LOCATION = ENV['DATABASE_LOCATION'] ||
   "#{sequel_driver}#{File.join(BASE_STORAGE_DIR, 'db.sqlite')}"
 
+if RUBY_PLATFORM == 'java'
+  require 'jdbc/sqlite3'
+  Jdbc::SQLite3.load_driver
+end
+
 DATABASE = Deltacloud::initialize_database
 
 # Detect if there are some pending migrations to run.


Mime
View raw message