Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager


    indicateNewStartupTask(splash, s_stringMgr.getString("Application.splash.loadinguseracc"));
    _actions.loadActionKeys(_prefs.getActionKeys());

    indicateNewStartupTask(splash, s_stringMgr.getString("Application.splash.createjdbcmgr"));
    _driverMgr = new SQLDriverManager();

    // TODO: pass in a message handler so user gets error msgs.
    indicateNewStartupTask(splash, s_stringMgr.getString("Application.splash.loadingjdbc"));
    _appFiles = new ApplicationFiles();
View Full Code Here


     ActionCollection mockActColl = col;
     if (col == null) {
        mockActColl = getEasyMockActionCollection();
     }
     expect(result.getActionCollection()).andReturn(mockActColl).anyTimes();
     SQLDriverManager driverManager = FwTestUtil.getEasyMockSQLDriverManager();
     expect(result.getSQLDriverManager()).andReturn(driverManager).anyTimes();
     SessionManager mockSessionManager = getEasyMockSessionManager();
     expect(result.getSessionManager()).andReturn(mockSessionManager)
                                       .anyTimes();
     if (replay) {
View Full Code Here

         String dbURL, boolean nice) throws SQLException {
      return getEasyMockSQLMetaData(dbName, dbURL, nice, true);
   }

   public static SQLDriverManager getEasyMockSQLDriverManager() {
      SQLDriverManager result = createMock(SQLDriverManager.class);
      Driver mockDriver = createMock(Driver.class);
      replay(mockDriver);
      expect(result.getJDBCDriver(isA(IIdentifier.class))).andReturn(mockDriver)
                                                          .anyTimes();
      replay(result);
      return result;
   }
View Full Code Here

         if (!(iSqlDr.getDriverClassName().startsWith("org.apache.derby.jdbc.EmbeddedDriver"))) {
            return;
         }
         //the code bellow is only for Embedded Derby Driver
         IIdentifier drId = iSqlDr.getIdentifier();
         SQLDriverManager sqlDrMan = _app.getSQLDriverManager();
         //Getting java.sql.Driver to run shutdown command
         Driver jdbcDr = sqlDrMan.getJDBCDriver(drId);
         //Shutdown Embedded Derby DB
         try {
            jdbcDr.connect("jdbc:derby:;shutdown=true", new Properties());
         } catch (SQLException e) {
            //it is always thrown as said in Embedded Derby API.
            //So it is not error it is info
            s_log.info(e.getMessage());
         }
         //Re-registering driver is necessary for Embedded Derby
         sqlDrMan.registerSQLDriver(iSqlDr);
      } catch (RuntimeException e) {
         s_log.error(e.getMessage(),e);
      } catch (MalformedURLException e) {
         s_log.error(e.getMessage(),e);
      } catch (IllegalAccessException e) {
View Full Code Here

  public void execute() throws BaseException
  {
    _conn = null;
    final IIdentifier driverID = _sqlAlias.getDriverIdentifier();
    final ISQLDriver sqlDriver = _app.getDataCache().getDriver(driverID);
    final SQLDriverManager mgr = _app.getSQLDriverManager();
    try
    {
      _conn = mgr.getConnection(sqlDriver, _sqlAlias, _userName, _password, _props);
    }
    catch (SQLException ex)
    {
      throw new WrappedSQLException(ex);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.