triggerService there is a spring container management, I passed the @ Interceptors (SpringBeanAutowiringInterceptor.class) injected into the MDB that intercaptor,As follows:
public interface TriggerService {
void saveTrigger(DBTrigger trigger);
}
@Service("triggerService")
public class TriggerServiceImpl implements TriggerService {
@Autowired
private TriggerDao triggerDao;
@Override
public void saveTrigger(DBTrigger trigger) {
triggerDao.addJobDetail(trigger.getJobDetail());
triggerDao.addTrigger(trigger.getCronTrigger());
}
}
There is about a two-stage transaction when triggerDao.addTrigger (trigger.getCronTrigger ()) This method call fails, why triggerDao.addJobDetail (trigger.getJobDetail ()) This method of data stored in the database Why did not rollback?