docs: private Object joinTransaction(EntityManager em) {
          boolean newTx = false;
          UserTransaction ut = null;
  
          if (isJTA) {
  	        try {
  	        	em.joinTransaction();
  	        } catch (TransactionRequiredException e) {
  				ut = findUserTransaction();
  				try {
  					if( ut != null && ut.getStatus() == Status.STATUS_NO_TRANSACTION ) { 
  		                ut.begin();
  		                newTx = true;
  		                // since new transaction was started em must join it
  		                em.joinTransaction();
  		            } 
  				} catch(Exception ex) {
  					throw new IllegalStateException("Unable to find or open a transaction: " + ex.getMessage(), ex);
  				}
  				
  				if (!newTx) {
  	            	// rethrow TransactionRequiredException if UserTransaction was not found or started
  	            	throw e;
  	            }
  			}
  	       
  	        if( newTx ) { 
  	            return ut;
  	        }
          } 
  //        else { 
  //            EntityTransaction tx = em.getTransaction();
  //            if( ! tx.isActive() ) { 
  //               tx.begin();
  //               return tx;
  //            }
  //        }
          return null;
      }