]> source.dussan.org Git - sonarqube.git/blob
8305592861e4d8c4187054e3a46cae53e0867acf
[sonarqube.git] /
1 class ActiveRecord::Base
2   class << self
3     def jdbc_connection(config)
4       adapter_class = config[:adapter_class]
5       adapter_class ||= ::ActiveRecord::ConnectionAdapters::JdbcAdapter
6       adapter_class.new(nil, logger, config)
7     end
8     alias jndi_connection jdbc_connection
9
10     def embedded_driver(config)
11       config[:username] ||= "sa"
12       config[:password] ||= ""
13       jdbc_connection(config)
14     end
15   end
16 end