title: Why session bean method throw EjbTransactionRolledbackException when RuntimeException was thrown
body: <p>I am trying to persist the entity with constraint validation,
  when invoke persist - there is constraint that thrown and the caller get <code>EjbTransactionRolledbackException</code>...
  so I try to call the validation explicit and throw <code>ConstraintViolationException</code>/<code>RuntimeException</code> and still the caller get <code>EjbTransactionRolledbackException</code>...
  when I throw <code>MyException</code> extends <code>Exception</code> - the caller get <code>MyException</code></p>
  
  <p>Even when I call explicit <code>sc.setRollBackOnly</code> it's still happened :(</p>
  
  <p>This shouldn't be the behavior.</p>
  
  <p>what's going on?</p>
  
  <p>Configuration:</p>
  
  <p>Netbeans 6.9.1
  Glassfish 3.0.1
  JPA 2.0 (EclipseLink)
  EJB 3.1</p>
  
  <p>Thanks!!!</p>
  
  <pre><code>@Stateless
  public class My {
  
  @PersistenceContext
  EntityManager em;
  
  @Resource
  Validator  validator;
  
  public Order checkout(Order order) {
      Set&lt;ConstraintViolation&lt;Order&gt;&gt; set = validator.validate(order, Default.class);
  
      if (!set.isEmpty()) {
          sc.setRollbackOnly();
          //throw new ConstraintViolationException(new HashSet&lt;ConstraintViolation&lt;?&gt;&gt;(set));
          throw new RuntimeException();
      }
  
      this.em.persist(order);
  }
  </code></pre>