title: Transactions (Atomicity property) in EJB 3 apply only to Database Operations - Am I right?
body: <p>I know that transactions could be used to bring about atomicity. </p>
  
  <p>Like if <code>methodOne()</code> <code>methodTwo()</code> <code>methodThree()</code> are clubbed into one transaction, if any of the method fails, the entire operation is rolled back. A rollback would result in a database-level rollback and as a result the database would be brought to a state, as it was before the transaction.</p>
  
  <p>But what if the methods made changes to state-variables or static-variables or wrote to some files in the filesystem ? My understanding is that a "rollback" doesn't apply for such non-database modifications and that those changes are not undone.  Is my understanding right ?</p>