コード例 #1
0
  public FBTpbMapper getMapper() throws FBResourceException {
    if (mapper != null) {
      return mapper;
    }

    if (tpbMapping == null) {
      mapper = FBTpbMapper.getDefaultMapper();
    } else {
      mapper = new FBTpbMapper(tpbMapping, getClass().getClassLoader());
    }

    mapper.setDefaultTransactionIsolation(defaultTransactionIsolation);

    for (Map.Entry<Integer, TransactionParameterBuffer> entry : customMapping.entrySet()) {
      Integer isolation = entry.getKey();
      TransactionParameterBuffer tpb = entry.getValue();

      mapper.setMapping(isolation, tpb);
    }

    return mapper;
  }
コード例 #2
0
 public void setDefaultTransactionIsolation(int defaultIsolationLevel) {
   defaultTransactionIsolation = defaultIsolationLevel;
   if (mapper != null) {
     mapper.setDefaultTransactionIsolation(defaultIsolationLevel);
   }
 }