Package com.cubusmail.server.util

Examples of com.cubusmail.server.util.DBManager


  }

  @Before
  public void init() {

    DBManager manager = this.applicationContext.getBean( DBManager.class );
    try {
      manager.initInternalDB();
      this.userAccountDao = this.applicationContext.getBean( IUserAccountDao.class );
    }
    catch (Exception e) {
      log.error( e.getMessage(), e );
      Assert.fail( e.getMessage() );
View Full Code Here


  public void initDB() {

    this.userAccountDao = this.applicationContext.getBean( IUserAccountDao.class );
    this.testUserAccount = this.applicationContext.getBean( "testUserAccount", UserAccount.class );
    this.dataSource = this.applicationContext.getBean( SingleConnectionDataSource.class );
    DBManager manager = this.applicationContext.getBean( DBManager.class );

    try {
      manager.initInternalDB();
      Long id = this.userAccountDao.saveUserAccount( testUserAccount );
      Assert.assertNotNull( id );
    }
    catch (SQLException e) {
      log.error( e.getMessage(), e );
View Full Code Here

    WebApplicationContext context = WebApplicationContextUtils
        .getRequiredWebApplicationContext( servletcontextevent.getServletContext() );

    try {
      DBManager dbManager = context.getBean( DBManager.class );
      dbManager.initInternalDB();
    }
    catch (Exception e) {
      log.fatal( e.getMessage(), e );
      throw new IllegalStateException( "Could not initialize internal database!" );
    }
View Full Code Here

TOP

Related Classes of com.cubusmail.server.util.DBManager

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.