title: Java JPA annotation @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) not working as expected
body: <p>Running J2EE application on JBoss 5.1 using Hibernate. I need to call some methods (in quartz scheduler) that use explicit database connections from an enterprise bean. Currently get an error about calling commit not allowed in a transaction.</p>
  
  <p>I was hoping that adding the <code>@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)</code> annotation to the bean method would allow me to call quartz api, but still get the same exception. Am I misunderstanding what this annotation means, or is something else going on?</p>
  
  <pre><code>2014-06-23 17:43:41,184 ERROR [http-0.0.0.0-8443-4] org.quartz.JobPersistenceException: Couldn't commit jdbc connection. You cannot commit during a managed transaction! [See nested exception: java.sql.SQLException: You cannot commit during a managed transaction!]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.commitConnection(JobStoreSupport.java:3661)
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3799)
      at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3703)
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.checkExists(JobStoreSupport.java:1897)
      at org.quartz.core.QuartzScheduler.checkExists(QuartzScheduler.java:1491)
      at org.quartz.impl.StdScheduler.checkExists(StdScheduler.java:555)
  </code></pre>
  
  <p>Some more data:</p>
  
  <p>1) If I call my managed bean method from a non-managed class without the annotation, then I get the same exception (transaction is created)</p>
  
  <p>2) If I call my managed bean method from a non-managed class with the annotation then I dont get the exception (no transaction created)</p>
  
  <p>3) If I call my managed bean method from another managed bean or from itself, then I get the exception with or without the annotation (transaction exists)</p>
  
  <p>So the annotation does seem to prevent a new transaction being created, but it does not seem to suspend an already existing transaction (or maybe I am getting this all wrong).</p>