title: EJB Transaction with call to POJO
body: <p>Suppose I have a session bean that implements a REQUIRED transaction method:</p>
  
  <pre><code>@TransactionAttribute(TransactionAttributeType.REQUIRED)
  public void doTransaction() throws Exception {
      try {
          ...
          // call to non-EJB bean object (not session, stateless or entity bean)
      } catch (Exception e) {
          context.setRollbackOnly();
          throw e;
      }
  }
  </code></pre>
  
  <p>Suppose doTransaction() changes the internal state of the non-bean object, and fails.  Does the rollback restore the original state of the non-bean?
  If not, what would be the recommanded way to handle such a case? (or are POJO calls within a transaction not allowed?)</p>