title: Spring + EJB 3.1 CMT vs BMT transactions
body: <p>We have a simple stateless EJB timer that gets an instance of a spring service injected into it. The spring service has a method marked as transactional. When the EJB uses Transaction Management Type CONTAINER the spring service call results in an IllegalStateException: Operation not allowed. So we set the EJB Transaction Management Type to be BEAN and everything works as advertised. Is this normal? I was under the impression that the spring transaction management would join the CMT.</p>
  
  <p><strong>example EJB</strong>    </p>
  
  <pre><code>@Stateless
  @TransactionManagement(TransactionManagementType.CONTAINER)
  @Interceptors(SpringBeanAutowiringInterceptor.class
  public class TimerService {
      @Autowired
      IHelloService helloService;
  
      @Schedule(second="*/1", minute="*",hour="*", persistent=false)
      public void doWork(){
          helloService.hello();
      }
  }
  </code></pre>
  
  <p><strong>example spring service</strong></p>
  
  <pre><code>@Service
  public class HelloService implements IHelloService {
      @Transactional
      public void hello(){
  
      }
  }
  </code></pre>