code: @Override
      public void commit(final Xid _xid,
                         final boolean _onePhase)
          throws XAException
      {
          try {
              if (getSession().hasPendingChanges()) {
                  getSession().save();
              }
              getSession().logout();
          } catch (final AccessDeniedException e) {
              throw new XAException("AccessDeniedException");
          } catch (final ItemExistsException e) {
              throw new XAException("ItemExistsException");
          } catch (final ReferentialIntegrityException e) {
              throw new XAException("ReferentialIntegrityException");
          } catch (final ConstraintViolationException e) {
              throw new XAException("AccessDeniedException");
          } catch (final InvalidItemStateException e) {
              throw new XAException("InvalidItemStateException");
          } catch (final VersionException e) {
              throw new XAException("VersionException");
          } catch (final LockException e) {
              throw new XAException(XAException.XA_RBDEADLOCK);
          } catch (final NoSuchNodeTypeException e) {
              throw new XAException("NoSuchNodeTypeException");
          } catch (final RepositoryException e) {
              throw new XAException("RepositoryException");
          } catch (final EFapsException e) {
              throw new XAException("RepositoryException");
          }
      }
docs: The method is called from the transaction manager if the complete
  transaction is completed.<br/>
  
  @param _xid      global transaction identifier (not used, because each
  file with the file id gets a new VFS store resource
  instance)
  @param _onePhase <i>true</i> if it is a one phase commitment transaction
  (not used)
  @throws XAException if any exception occurs (catch on
  {@link java.lang.Throwable})