Menu

#55 Auto downloading JDBC driver

snapshot
pending
app (3)
5
2018-12-22
2011-08-31
Anonymous
No

This patch adds ability to auto download JDBC driver.
Available drivers are stored in xml file - available_drivers_list.xml. It should be in the HOME/.squirrel-sql folder.
Icon should be put into sql12/app/src/main/resources/net/sourceforge/squirrel_sql/client/resources/images folder.

Discussion

  • Nobody/Anonymous

     
  • Rob Manning

    Rob Manning - 2011-09-02

    Initial comments :

    1. The available_drivers_list.xml file should be downloaded from a URL and not shipped with SQuirreL - this would allow us to make updates to the driver locations without forcing users to upgrade.

    2. e.printStackTrace() in the catch block is unacceptable in production (non-test code). You should declare or use an existing logger to log and error that includes a reasonable message and the original exception.

    3. We have a threadpool that is available from Application.getThreadPool() - use that instead of newing up your own thread such as the following code that you added:

    new Thread(runnable).start();

    4. For internationalizing SQuirreL, it is important to use the StringManager and I18NStrings.properties instead of hard-coding English strings that the user will see like the following line from your code:

    new JLabel("JDBC driver files", SwingConstants.RIGHT)

    5. Add a copyright notice to the top of every file you contribute that licenses it under an open source license (best to use LGPL to be consistent with the current licensing of SQuirreL)

    6. Do not "squelch" exceptions (meaning, catch but ignore) as the following code does for the ArrayIndexOutOfBoundsException :

    + } catch (FileNotFoundException e) {
    + e.printStackTrace();
    + } catch (ArrayIndexOutOfBoundsException e){
    + } finally {
    + decoder.close();
    + }

    I may have more comments, but that is enough for tonight :)

    Rob

     
  • Rob Manning

    Rob Manning - 2011-09-02
    • assigned_to: nobody --> manningr
    • milestone: --> snapshot
     
  • Nobody/Anonymous

    I'd really like to see this feature in the app. It'll make the instal process not only easier but also faster. Carry on please, please, please, ... :)

     
  • Gerd Wagner

    Gerd Wagner - 2012-04-20
    • status: open --> pending
     
  • Gerd Wagner

    Gerd Wagner - 2012-04-20

    Besides Robs points I think that downloads should be accessible in a similar way as driver web pages are.

    Nonetheless the patch contains basic functions that can be used to implement the feature.

    But since we won't integrate it as it is and right away I set in to pending.

     
  • Mehmet Can Cömert

    Hello,

    First of all thanks for your effort Squirrel is a really great SQL client.

    I know this patch is a bit behind the time and code probably has developed much differently in recent time.
    But I was wondering as well if there is an effort planned to download at least open source JDBC Drivers automatically together with the plugins?

    Currently after I install database driver plugins I still need to download JAR files for the JDBC Drivers manually from Maven Central or any other Web Site.
    I place them under the plugins directory manually.

    It would really help if there is a possibilty to automatically download latest version of driver from some central place such as Maven Central etc.

    Do you have any plans on this direction?

     
  • Gerd Wagner

    Gerd Wagner - 2018-12-22

    Hi Mehmet,
    thanks for using SQuirrel and nice to know you like it.

    As to your question: No, we don't plan to implement automatic download of JDBC drivers. All we do is offer to place links to driver vendor's web pages in our default driver definitions.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.