diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-09-13 19:31:25 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-09-13 19:31:25 +0200 |
commit | 57127f5858ba9c73108e75f8d7a3d8a6cb1f8109 (patch) | |
tree | 82e1d5328ff59b110d2115981c23507e48784570 /sonar-server | |
parent | 38ff19caeffef6048056ea26cb7bdaacd0c8cf52 (diff) | |
download | sonarqube-57127f5858ba9c73108e75f8d7a3d8a6cb1f8109.tar.gz sonarqube-57127f5858ba9c73108e75f8d7a3d8a6cb1f8109.zip |
Fix support of JNDI datasource
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/config/database.yml | 8 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb | 14 |
2 files changed, 7 insertions, 15 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/config/database.yml b/sonar-server/src/main/webapp/WEB-INF/config/database.yml index 59788a4d189..7b755e4b2ba 100644 --- a/sonar-server/src/main/webapp/WEB-INF/config/database.yml +++ b/sonar-server/src/main/webapp/WEB-INF/config/database.yml @@ -17,8 +17,12 @@ base: &base pool: <%= ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getConfigurationValue('sonar.jdbc.maxActive') || 10 %> # PostgreSQL - schema_search_path: <%= ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getConfigurationValue('sonar.jdbc.postgreSearchPath') %> - +<% + search_path = ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getConfigurationValue('sonar.jdbc.postgreSearchPath') + if search_path +%> + schema_search_path: <%= search_path %> +<% end %> # Oracle <% schema = ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getConfigurationValue('sonar.hibernate.default_schema') diff --git a/sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb b/sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb index cc53739470d..fec934983a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb +++ b/sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb @@ -59,23 +59,11 @@ module ActiveRecord end def configure_jdbc - unless config[:driver] && config[:url] - raise ::ActiveRecord::ConnectionNotEstablished, "jdbc adapter requires driver class and url" - end - - driver = config[:driver].to_s - user = config[:username].to_s - pass = config[:password].to_s - url = configure_url # sonar - #jdbc_driver = (config[:driver_instance] ||= JdbcDriver.new(driver)) - # /sonar @connection_factory = JdbcConnectionFactory.impl do - # sonar - #jdbc_driver.connection(url, user, pass) ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getConnection() - # /sonar end + # /sonar end end |