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; }
public void setTransactionParameters(int isolation, TransactionParameterBuffer tpb) { customMapping.put(isolation, tpb); if (mapper != null) { mapper.setMapping(isolation, tpb); } }