code: @Override
      public void registerSynchronization(Synchronization sync) {
  
          TransactionManager transactionManager = this.getTransactionManager();
          try {
              Transaction tran = transactionManager.getTransaction();
              if (tran instanceof TransactionImpl) {
                  ((TransactionImpl) tran).registerSynchronization(sync, RegisteredSyncs.SYNC_TIER_OUTER);
              } else {
                  tran.registerSynchronization(sync);
              }
          } catch (SystemException se) {
              FFDCFilter.processException(se, this.getClass().getName() + ".registerSynchronization", "177", this);
          } catch (RollbackException re) {
  
              FFDCFilter.processException(re, this.getClass().getName() + ".registerSynchronization", "180", this);
          } catch (IllegalStateException ie) {
              FFDCFilter.processException(ie, this.getClass().getName() + ".registerSynchronization", "182", this);
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.jboss.weld.transaction.spi.TransactionServices#registerSynchronization(javax.transaction.Synchronization)