Package com.bleujin.framework.db.servant

Examples of com.bleujin.framework.db.servant.StdOutServant


  protected DBManager dbm;
  protected DBController dc;

  public void setUp() throws Exception {
    dbm = new H2EmbedPoolDBManager("webapps/simple/WEB-INF/h2-config.xml");
    dc = new DBController("test", dbm, new StdOutServant());
    dc.initSelf() ;
  }
View Full Code Here


public class MySQLMother extends TestCase{

  protected DBController dc ;
  public void setUp() throws Exception {
    MySQLDBManager dbm = new MySQLDBManager("jdbc:mysql://novision/test", "bleu", "redf") ;
    dc = new DBController("mysql", dbm, new StdOutServant()) ;
    dc.initSelf() ;
   
  }
View Full Code Here

 
  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() ;

View Full Code Here

  }
 
 
  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) ;
View Full Code Here

    //Thread.sleep(5000) ;
  }
 
 
  public void testAddServant() throws Exception {
    dc.addServant(new StdOutServant());
    Thread ts = new QueryThread(dc) ;
    ts.start() ;
   
    ts.join() ;
  }
View Full Code Here

   * ������ 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

  
   */

  public void testServantChain() throws Exception {
    DBController newDc = new DBController("newDC", dc.getDBManager()) ;
    newDc.addServant(new StdOutServant(StdOutServant.All)) ; // ��� IQueryable�� ȭ�鿡 ����Ʈ�ϴ� Servant�� �߰��Ѵ�.
    newDc.addServant(new StdOutServant(StdOutServant.All)) ; // �Ѱ� �� �߰��Ѵ�.
    newDc.initSelf() ;
   
    newDc.getRows("select 1 from copy_sample") ;
    newDc.destroySelf() ;
  }
View Full Code Here

TOP

Related Classes of com.bleujin.framework.db.servant.StdOutServant

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.