I'm using Spring 3.0 with GlassFish 3.0.1. I've got a WebService defined as an EJB and is defined as requiring a Transaction:
The WebService class utilizes my dao framework that is using the Spring JpaTemplate. Each Dao is defined as requiring a Transaction using Spring annotations:
I have defined in my applicationContext.xml the following so Spring's transaction management will work:
So my question is, if the GlassFish container begins a global transaction when the WebService is invoked, when a Dao is accessed will Spring's transaction management recognize the existing global transaction and participate in it or will it begin another transaction?
@Stateless @TransactionAttribute(TransactionAttributeType.REQUIRED) @Interceptors(SpringBeanAutowiringInterceptor.class) @WebService(...) @Service
@Transactional(propagation = Propagation.REQUIRED)
<tx:jta-transaction-manager /> <tx:annotation-driven/>