title: Rollback of transactions with java ee and Jboss AS
body: <p>I have a stateless bean, that has container for transaction management, and i have 2 separate for loops in what i add some data to the database, and in other i delete some data.
  After that, i run some validity check, and if it fails, i throw an exception.
  What is not clear to me is, if an error is thrown, why is transaction not rolled back? I tried throwing a custom exception at first, then a RollbackException, but the result is the same - rollback is not done.
  Is it possible that Jboss is overriding some of mine settings, or am I missing out on some other part? </p>
  
  <p>Also, i was wondering what is considered "a transaction" in stateless bean, that is container managed? Is it everything inside a method, or could one method contain more than one transaction?</p>