Even when the EJB uses BMT, the EJB container imposes some rules on the transactional boundaries that the bean code must observe. In a stateless session bean, the bean-managed transaction must complete prior to the end of the business method. In a stateful session bean, the bean-managed transaction can be carried over from one invocation of a business method to the next. In all cases, the bean-managed transaction cannot be part of the client's transaction, if there is one.
When the bean uses BMT, the EJB container calls the bean without starting a managed transaction. A JDO implementation that is aware of managed transactions starts the container-supported javax.transaction.UserTransaction when the JDO Transaction begins. This action allows the container to manage the transaction in the event that other beans are called from within the BMT bean.