/** Closes transaction manager. All registered {@link JtxResourceManager} will be closed. */
 public void close() {
   for (JtxResourceManager resourceManager : this.resourceManagers.values()) {
     try {
       resourceManager.close();
     } catch (Exception ex) {
       // ignore
     }
   }
   resourceManagers.clear();
 }
 /** Registers new {@link JtxResourceManager resource manager}. */
 public void registerResourceManager(JtxResourceManager resourceManager) {
   if ((oneResourceManager == true) && (resourceManagers.isEmpty() == false)) {
     throw new JtxException("TX manager allows only one resource manager");
   }
   this.resourceManagers.put(resourceManager.getResourceType(), resourceManager);
 }