Title: [707] trunk/activerecord-jdbc/lib/active_record/connection_adapters/jdbc_adapter.rb: fixed problem with loading the driver
Revision
707
Author
tirsen
Date
2007-08-24 02:11:16 -0400 (Fri, 24 Aug 2007)

Log Message

fixed problem with loading the driver

Modified Paths


Diff

Modified: trunk/activerecord-jdbc/lib/active_record/connection_adapters/jdbc_adapter.rb (706 => 707)


--- trunk/activerecord-jdbc/lib/active_record/connection_adapters/jdbc_adapter.rb	2007-08-24 03:40:45 UTC (rev 706)
+++ trunk/activerecord-jdbc/lib/active_record/connection_adapters/jdbc_adapter.rb	2007-08-24 06:11:16 UTC (rev 707)
@@ -197,7 +197,8 @@
       end
       
       def driver_class
-        eval(@name)
+        require 'jruby'
+        JRuby.runtime.getJRubyClassLoader.loadClass(@name)
       end
       
       def load
@@ -205,7 +206,7 @@
       end
       
       def create
-        driver_class.new
+        driver_class.newInstance
       end
     end
 
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to