Examples of DBManager


Examples of br.com.fiapbank.persistencia.dao.db.DBManager

  }

  @Override
  public void contextInitialized(ServletContextEvent arg0) {
    try {
      DBManager dbManager = new DBManagerJPA();
      dbManager.init();
    } catch (Exception e) {
      LOG.error("Erro na inicializacao do sistema", e);
    }
  }
View Full Code Here

Examples of com.bleujin.framework.db.manager.DBManager

    }


    public void testCase3() throws Exception{

        DBManager dbm = dc.getDBManager();
    Connection conn = dbm.getConnection() ;

        long start = System.currentTimeMillis() ;
        PreparedStatement ps = conn.prepareStatement("insert into a# Select ? a,? from dual t1 Where Exists(Select 1 From copy_tblc WHere no2 = t1.dummy)");
        ps.clearBatch();
        for (int i = 0; i < MaxTryCount; i++) {
            ps.setInt(1, i);
            ps.setString(2, "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789");
            ps.addBatch();
        }
        ps.executeBatch() ;
        ps.close() ;
        dbm.freeConnection(conn);
        long end = System.currentTimeMillis() ;

        System.out.println("Case 3 (end - start)="+ (end - start));
    }
View Full Code Here

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

Examples of com.gads.model.DBManager

   * Constructor that create a new GeoController object.
   * @param m --> The MessageManager with all the messages to the user.
   */
  public GeoController(ViewBridge v){
   
    db = new DBManager();
    parser = new XMLGeoParser();
    loadFromDatabase();
   
    view = v;
    pool = new ArrayList<Integer>();
View Full Code Here

Examples of com.netfever.dbmanager.DbManager

      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception
  {
    DbManager dbManager;
    QueryBuilder builder;
    RunnableQuery query;
    Connection conn;
    AnyActionForm frm;
    DataSource ds;
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager

    /**
     */
    public JMSBGDAOImpl() throws BrokerException {

        DBManager dbMgr = DBManager.getDBManager();

        tableName = dbMgr.getTableName(TABLE_NAME_PREFIX);

        insertSQL = new StringBuffer(128)
            .append( "INSERT INTO " ).append( tableName )
            .append( " ( " )
            .append( NAME_COLUMN ).append( ", " )
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager

        Connection myconn = null;
        PreparedStatement pstmt = null;
        Exception myex = null;
        try {
            DBManager dbMgr = DBManager.getDBManager();
            if (conn == null) {
                conn = dbMgr.getConnection(true);
                myconn = conn;
            }

            try {
                pstmt = conn.prepareStatement(insertSQL);
                pstmt.setString(1, name);
                pstmt.setString(2, dbMgr.getBrokerID());
                pstmt.setLong(3, System.currentTimeMillis());
                pstmt.setLong(4, 0L);
                pstmt.executeUpdate();
            } catch (Exception e) {
                myex = e;
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager

        Connection myconn = null;
        PreparedStatement pstmt = null;
        Exception myex = null;
        try {
            DBManager dbMgr = DBManager.getDBManager();
            if (conn == null) {
                conn = dbMgr.getConnection(true);
                myconn = conn;
            }

            pstmt = conn.prepareStatement(updateBrokerIdSQL);
            pstmt.setString(1, newBrokerId);
            pstmt.setLong(2, System.currentTimeMillis());
            pstmt.setString(3, name);
            pstmt.setString(4, expectedBrokerId);
            if (Globals.getHAEnabled()) {
                pstmt.setString(5, dbMgr.getBrokerID());
            }

            if (pstmt.executeUpdate() == 0) {
                Util.checkBeingTakenOver(conn, dbMgr, logger, logger_);
                throw new KeyNotFoundException(
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager

        Connection myconn = null;
        PreparedStatement pstmt = null;
        Exception myex = null;
        try {
            DBManager dbMgr = DBManager.getDBManager();
            if (conn == null) {
                conn = dbMgr.getConnection(true);
                myconn = conn;
            }

            pstmt = conn.prepareStatement(deleteSQL);
            pstmt.setString(1, name);
            pstmt.setString(2, dbMgr.getBrokerID());
            if (pstmt.executeUpdate() == 0) {
                throw new KeyNotFoundException("Name "+name+" not found in store ");
            }
        } catch (Exception e) {
            myex = e;
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager

     * @param conn database connection
     * @throws BrokerException
     */
    public void deleteAll(Connection conn) throws BrokerException {

        DBManager dbMgr = DBManager.getDBManager();

        String whereClause = new StringBuffer(128)
               .append( BROKER_ID_COLUMN ).append( " = '" )
               .append( dbMgr.getBrokerID() ).append( "'" )
               .toString();
        deleteAll(conn, whereClause, null, 0);
    }
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.