title: @Transactional annotation java.lang.IllegalArgumentException: Transaction must be running
body: <p>I am using JavaEE7 and container managed transactions in my Project. Although i have @Transactional annotation on method, i am getting "Transaction must be running" exception.
  Code seems as following:</p>
  
  <pre><code>@Transactional(Transactional.TxType.MANDATORY)
  public void myMethod(Project project) {
  
      final ObjectIdentity objectId = new ObjectIdentityImpl(project);
      final Sid sid = new PrincipalSid(SecurityContextHolder.getContext().getAuthentication());
      final Permission p = BasePermission.ADMINISTRATION;
      MutableAcl acl = null;
      try {
          List&lt;Sid&gt; sids = new ArrayList&lt;&gt;();
          sids.add(sid);
          acl = (MutableAcl) aclService.readAclById(objectId, sids);
  
      } catch (Exception ex) {
          acl = ((MutableAclService) aclService).createAcl(objectId); // This line causes exception
      }
  
      acl.insertAce(acl.getEntries().size(), p, sid, true);
      aclService.updateAcl(acl);
  }
  </code></pre>
  
  <p>What is missing in this code, that transaction does not begin?</p>
  
  <p>Kind regards,</p>
  
  <p>Bilal</p>