Package com.founder.fix.fixflow.core.impl.db

Examples of com.founder.fix.fixflow.core.impl.db.FixConnectionResult


  public void rollBackConnection() {
    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        FixConnectionResult connectionobj = connectionMap.get(mapKey);
        try {
          if (connectionobj != null) {
            connectionobj.rollBackConnection();
          }
        } catch (Exception e) {
          e.printStackTrace();
          throw new FixFlowDbException(e.toString(), e);
        }
View Full Code Here


    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        if (mapKey.equals(dataBaseId)) {
          FixConnectionResult connectionobj = connectionMap.get(mapKey);
          try {
            if (connectionobj != null) {
              connectionobj.rollBackConnection();

            }
          } catch (Exception e) {
            e.printStackTrace();
            throw new FixFlowDbException(e.toString(), e);
View Full Code Here

  public void commitConnection() {
    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        FixConnectionResult connectionobj = connectionMap.get(mapKey);
        try {
          if (connectionobj != null) {
            connectionobj.commitConnection();
          }
        } catch (Exception e) {
          e.printStackTrace();
          throw new FixFlowDbException(e.toString(), e);
        }
View Full Code Here

    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        if (mapKey.equals(dataBaseId)) {
          FixConnectionResult connectionobj = connectionMap.get(mapKey);
          try {
            if (connectionobj != null) {
              connectionobj.commitConnection();

            }
          } catch (Exception e) {
            e.printStackTrace();
            throw new FixFlowDbException(e.toString(), e);
View Full Code Here

  public void colseConnection() {
    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        FixConnectionResult connectionobj = connectionMap.get(mapKey);
        try {
          if (connectionobj != null) {
            connectionobj.colseConnection();
          }
        } catch (Exception e) {
          e.printStackTrace();
          throw new FixFlowDbException(e.toString(), e);
        }
View Full Code Here

    // TODO Auto-generated method stub
    Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
    if (connectionMap != null) {
      for (String mapKey : connectionMap.keySet()) {
        if (mapKey.equals(dataBaseId)) {
          FixConnectionResult connectionobj = connectionMap.get(mapKey);
          try {
            if (connectionobj != null) {
              connectionobj.colseConnection();

            }
          } catch (Exception e) {
            e.printStackTrace();
            throw new FixFlowDbException(e.toString(), e);
View Full Code Here

  public void contextClose(boolean threadLocalContext, boolean connection) {
    if (connection) {
      Map<String, FixConnectionResult> connectionMap = Context.getDbConnectionMap();
      if (connectionMap != null) {
        for (String mapKey : connectionMap.keySet()) {
          FixConnectionResult connectionobj = connectionMap.get(mapKey);
          try {
            if (connectionobj != null) {
              connectionobj.colseConnection();
            }
          } catch (Exception e) {
            e.printStackTrace();
            throw new FixFlowDbException(e.toString(), e);
          }
View Full Code Here

    Stack<Map<String, FixConnectionResult>> stack = getStack(dbConnectionThreadLocal);
    if (stack.isEmpty()) {

      Map<String, FixConnectionResult> connectioMap = new HashMap<String, FixConnectionResult>();

      FixConnectionResult fixConnectionResult = ConnectionManagement.INSTANCE().getFixConnectionResult(dbId);

      connectioMap.put(dbId, fixConnectionResult);

      getStack(dbConnectionThreadLocal).push(connectioMap);

      fixConnectionResult.openConnection();

      return fixConnectionResult.getConnection();

    }

    Map<String, FixConnectionResult> connMap = stack.peek();
    if (connMap == null) {
      Map<String, FixConnectionResult> connectioMap = new HashMap<String, FixConnectionResult>();

      FixConnectionResult fixConnectionResult = ConnectionManagement.INSTANCE().getFixConnectionResult(dbId);

      connectioMap.put(dbId, fixConnectionResult);

      getStack(dbConnectionThreadLocal).push(connectioMap);

      fixConnectionResult.openConnection();

      return fixConnectionResult.getConnection();
    } else {

      FixConnectionResult fixConnectionResult = connMap.get(dbId);

      if (fixConnectionResult == null) {

        FixConnectionResult fixConnectionResultObj = ConnectionManagement.INSTANCE().getFixConnectionResult(dbId);

        connMap.put(dbId, fixConnectionResultObj);

        fixConnectionResultObj.openConnection();

        return fixConnectionResultObj.getConnection();

      } else {

        // fixConnectionResult.openConnection();
View Full Code Here

  @Override
  public FixConnectionResult getFixConnectionResult(String dbId) {
   
   
    FixConnectionResult fixConnectionResult=new FixFlowConnectionResultImpl(dbId);
   
    return fixConnectionResult;

  }
View Full Code Here

    Context.setFixConnectionResult(dbId, connection);
  }

  @Override
  public void setFixConnection(String dbId, Connection connection) {
    FixConnectionResult fixConnectionResult=new FixFlowConnectionResultImpl(dbId,connection);
    Context.setFixConnectionResult(dbId, fixConnectionResult);
   
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.db.FixConnectionResult

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.