Esempio n. 1
0
 /** 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();
 }
Esempio n. 2
0
 /** 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);
 }