Examples of DatabaseConnection


Examples of com.rapleaf.jack.DatabaseConnection

    }
    Boolean use_mock = (Boolean)env_info.get("use_mock_db");
    if (use_mock != null && use_mock) {
      this.database1 = mockDatabases.getDatabase1();
    } else {
      this.database1 = new Database1Impl(new DatabaseConnection("database1"), this);
    }
  }
View Full Code Here

Examples of cx.fbn.nevernote.sql.DatabaseConnection

  public void run() {
    errorSharedNotebooks = new ArrayList<String>();
    errorSharedNotebooksIgnored = new HashMap<String,String>();
    try {
      logger.log(logger.EXTREME, "Starting thread");
      conn = new DatabaseConnection(logger, dburl, indexUrl, resourceUrl, dbuid, dbpswd, dbcpswd, 200);
      while(keepRunning) {
        logger.log(logger.EXTREME, "Blocking until work is found");
        String work = workQueue.take();
        logger.log(logger.LOW, "Dirty Notes Before Sync: " +new Integer(conn.getNoteTable().getDirtyCount()).toString());
        logger.log(logger.EXTREME, "Work found: " +work);
View Full Code Here

Examples of database.DatabaseConnection

    this.add(left);
    this.add(right);   
  }
 
  public void addEntrys() throws ProblemwithDataApplication{
    DatabaseConnection con = DatabaseConnection.getInstance();
    con.connect();
    left.removeAll();
    try {     
      gambler = con.getAllGamblers();
    } catch (ProblemwithDataApplication e) {
      e.printStackTrace();
    }
    int count = gambler.size();
    int count_new = rows-count;
       
    left.add(new JLabel());
    if(count>0){
      for(int i=0;i<count;i++){
        String gambler_name = gambler.get(i);
        try {
          gambler player = con.getGambler(gambler_name);
          left.add(new player_choose_entry(this,player.getId(),player.getName(),player.getMoney(),player.getStyle()));
        } catch (ProblemwithDataApplication e) {
          e.printStackTrace();
        }
      }
    }
    if(count_new>0)left.add(new player_choose_entry(this));
    left.add(new JLabel());
    con.shutdown();
    this.setVisible(false);
    this.setVisible(true);
  }
View Full Code Here

Examples of liquibase.database.DatabaseConnection

            Connection connection = null;
            try {

                connection = dataSource.get().getConnection();
                DatabaseConnection dc = new JdbcConnection( connection );
                Liquibase liquibase = new Liquibase( config.get().changeLog().get(), new ClassLoaderResourceAccessor(), dc );
                liquibase.update( config.get().contexts().get() );

            } catch ( SQLException e ) {
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

    assertEquals(ActionSupport.SUCCESS,action.execute());
  }

  @Override
  protected IDatabaseConnection getConnection() throws Exception {
    return new DatabaseConnection(dataSource.getConnection());
  }
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

  private BasicDataSource dataSource;
 
  @Override
  protected IDatabaseConnection getConnection() throws Exception {
    IDatabaseConnection dc = new DatabaseConnection(dataSource.getConnection());
    DatabaseConfig config = dc.getConfig();
    config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
        new MySqlDataTypeFactory());
    return dc;
  }
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

    dataSource.setUsername("gnizr");
    dataSource.setPassword("gnizr");
    dataSource.setUrl("jdbc:mysql://localhost/gnizr_db");
    dataSource.setDriverClassName("com.mysql.jdbc.Driver");
   
    IDatabaseConnection dc = new DatabaseConnection(dataSource.getConnection());
    DatabaseConfig config = dc.getConfig();
    config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
        new MySqlDataTypeFactory());

        // full database export
        IDataSet fullDataSet = dc.createDataSet();
        FlatXmlDataSet.write(fullDataSet, new FileOutputStream("full.xml"));            
    }
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

  private BasicDataSource dataSource;
 
  @Override
  protected IDatabaseConnection getConnection() throws Exception {
    return new DatabaseConnection(dataSource.getConnection());
  }
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

  private BasicDataSource dataSource;
 
  @Override
  protected IDatabaseConnection getConnection() throws Exception {
    return new DatabaseConnection(dataSource.getConnection());
  }
View Full Code Here

Examples of org.dbunit.database.DatabaseConnection

        try {
            DataSource datasource = ((DataSource)new InitialContext().lookup(datasourceJndiName));

            // Get a JDBC connection from JNDI datasource
            Connection con = datasource.getConnection();
            IDatabaseConnection dbUnitCon = new DatabaseConnection(con);
            editConfig(dbUnitCon.getConfig());
            return dbUnitCon;
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.