title: Container-managed transaction in JAX-WS, weblogic
body: <p>I'm trying to use Container-Managed Transactions inside webservice, but transaction isn't created. I have something like that:</p>
  
  <pre><code>@WebService(...)
  @Stateless
  @TransactionManagment(TransactionManagmentType.CONTAINER)
  public class ExampleService {
  
    // EntityManager and other fields
  
    @TransactionAttribure(TransactionAttributeType.REQUIRED)
    public void test(String s){
       // persist something with EntityManager
    }
  }
  </code></pre>
  
  <p>When I call this method, I get javax.persistence.TransactionRequiredException: The method public abstract void javax.persistence.EntityManager.persist(java.lang.Object) must be called in the context of a transaction.</p>
  
  <p>What am I doing wrong?
  Thanks!</p>