exist
exist copied to clipboard
Feature/sql to use jdbc xars
Description:
Loads the JDBC driver using the Class.forName() call. It allows for the JDBC driver files that I have created as packages to be utilized from the SQL connect.
Reference:
Type of tests:
I do not think that the test failures are related to my code change. The failures are on the windows-latest tests and that appears to be the same with other pull requests.
@adamretter In order for the libraries in the XARs to be accessible, the Class.forName() is necessary. I am thinking of adding a driver available function in the SQL to determine if the library is available.
@lcahlander I think it depends... If your drivers are JDBC 4 compliant then I don't think you actually need the Class.forName even in a Xar. I might be wrong though...
If they are older drivers you will need that. Do you have an example of an older driver you are using?
Does it hurt anything to do the call?
Does it hurt anything to do the call?
I don't know, but my preference would be not to add it if we don't need it. Can you tell me which driver you are using that shows the problem?
I have installed my XAR for MySQL in the current eXist-db 6.0.1
I then try calling my MySQL database through the standard sql:get-connection()
When I connect to the MySQL database in my model harvester, I use the Class.forName() call to have the JDBC driver available to my code. I can change things so that there is a call to see if the driver is loaded into eXist-db.







