org.sonar.batch.bootstrap
Class JdbcDriverHolder

java.lang.Object
  extended by org.sonar.batch.bootstrap.JdbcDriverHolder

public class JdbcDriverHolder
extends Object

Contains and provides class loader extended with the JDBC Driver hosted on the server-side.


Constructor Summary
JdbcDriverHolder(FileCache fileCache, AnalysisMode analysisMode, ServerClient serverClient)
           
 
Method Summary
 void start()
           
 void stop()
          This method automatically invoked by PicoContainer and unregisters JDBC drivers, which were forgotten.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcDriverHolder

public JdbcDriverHolder(FileCache fileCache,
                        AnalysisMode analysisMode,
                        ServerClient serverClient)
Method Detail

start

public void start()

stop

public void stop()
This method automatically invoked by PicoContainer and unregisters JDBC drivers, which were forgotten.

Dynamically loaded JDBC drivers can not be simply used and this is a well known problem of DriverManager, so workaround is to use proxy. However DriverManager also contains memory leak, thus not only proxy, but also original driver must be unregistered, otherwise our class loader would be kept in memory.

This operation contains unnecessary complexity because:



Copyright © 2009–2015 SonarSource. All rights reserved.