Examples of DBController


Examples of com.bleujin.framework.db.DBController

    MSSQL2000TxTransaction() {
        this(new MSSQLDBManager("jdbc:microsoft:sqlserver://novision:1433;DatabaseName=pubs", "pubs", "pubs"), "test");
    };

    public MSSQL2000TxTransaction(MSSQLDBManager dbm, String name) {
        super(new DBController(dbm), name);
    }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

  protected HSQLChainUserProcedure(IDBController dc, String procName, String stmtSQL) {
    super(dc, procName);
    this.procName = procName;
    this.chainedSQL = stmtSQL;
    this.chain = new DBController(dc.getDBManager()).createUserProcedures(stmtSQL);
    addProcedure(stmtSQL, chain);

  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

 
  public void testMultiController() throws Exception {
    String query = "select * from dual";

    DBController first = new DBController("first", dc.getDBManager(), new StdOutServant()) ;
    first.initSelf() ;
    Rows frows = first.getRows(query) ;
    assertEquals(1, frows.getRowCount()) ;
    first.destroySelf() ;
   
    Rows drows = dc.getRows(query) ;
    assertEquals(1, drows.getRowCount()) ;
   
    DBController second = new DBController("second", dc.getDBManager(), new StdOutServant()) ;
    Rows srows = second.getRows(query) ;
    assertEquals(1, drows.getRowCount()) ;
   
    dc.destroySelf() ;

    Rows srows2 = second.getRows(query) ;
    assertEquals(1, srows2.getRowCount()) ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

  }
 
 
  public void testThread() throws Exception {
   
    DBController ndc = new DBController("test", dc.getDBManager(), new StdOutServant()) ;
    ndc.initSelf() ;
   
    Thread[] ts = new Thread[5] ;
    for(int i = 0 ; i < ts.length ; i++){
      ts[i] = new QueryThread(ndc) ;
    }
   
    for(int i = 0 ; i < ts.length ; i++){
      ts[i].start() ;
    }
   
    for(int i = 0 ; i < ts.length ; i++){
      ts[i].join() ;
    }
   
    ndc.destroySelf() ;
    //Thread.sleep(5000) ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

public class OracleUserCommandPlan implements PlanPrintable{

  private DBController dc ;
  private IUserCommand cmd ;
  public OracleUserCommandPlan(IDBController dc, IUserCommand cmd) {
    this.dc = new DBController(dc.getDBManager()) ; // none servant
    this.cmd = cmd ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

  public void setUp() throws Exception {
//    DBManager dbm = new MySQLPoolDBManager("jdbc:mysql://novision/test", "bleu", "redf") ;
//    DBManager dbm = new MSSQLPoolDBManager("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test", "bleu", "redf") ;
    DBManager dbm = new OraclePoolDBManager("jdbc:oracle:thin:@novision:1521:bleujin", "setuptest", "setuptest") ;
//    DBManager dbm = new OracleCacheDBManager("jdbc:oracle:thin:@novision:1521:bleujin", "setuptest", "setuptest") ;
    dc = new DBController(dbm) ;
    dc.initSelf() ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

public class TestJSON extends TestCase{

  private DBController dc ;
  public void setUp() throws Exception {
    DBManager dbm = new MSSQLDBManager("jdbc:sqlserver://localhost;databasename=test", "bleu", "redf") ;
    dc = new DBController(dbm) ;
    dc.initSelf() ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

    conn.close();
  }

  public void setUp() throws Exception{
    MSSQLDBManager dbm = new MSSQLDBManager("jdbc:sqlserver://localhost;databasename=test", "bleu", "redf");
    dc = new DBController(dbm) ;
    dc.initSelf() ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

   * �������� IDBController�� init Ȥ�� destroy �Ѵٰ� �ؼ� ������ DBController�� DBManger�� �������� �ʴ´�.
   *
   * DBController�� Init �޼ҵ�� DBManger�� Ǯ�� Ȱ��ȭ��Ű�� Servant �����带 ���۽�Ų��.
   */
  public void testDCInit() throws Exception {
    DBController newDc = new DBController("newDC", dc.getDBManager()) ;
    newDc.initSelf() ;
   
    Rows rows = newDc.getRows("select 1 from copy_sample") ;
    newDc.destroySelf() ;

    assertEquals(1, rows.firstRow().getInt(1)) ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.DBController

   *
   * ������ StdOutServant�� ������ �������� ������ ������ ������ ����ð��� StdOut�� ��´�.
   */
 
  public void testServant() throws Exception {
    DBController newDc = new DBController("newDC", dc.getDBManager()) ;
    newDc.addServant(new StdOutServant(StdOutServant.All)) ; // ��� IQueryable�� ȭ�鿡 ����Ʈ�ϴ� Servant�� �߰��Ѵ�.
    newDc.initSelf() ;
   
    newDc.getRows("select 1 from copy_sample") ;
    newDc.destroySelf() ;
  }
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.