[jboss-user] [EJB3] - Re: A question about the transaction?

Michael Owen do-not-reply at jboss.com
Tue Jun 18 03:09:13 EDT 2013


Michael Owen [https://community.jboss.org/people/liverpoolilove] created the discussion

"Re: A question about the transaction?"

To view the discussion, visit: https://community.jboss.org/message/823600#823600

--------------------------------------------------------------
*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?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/823600#823600]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130618/14b193d5/attachment.html 


More information about the jboss-user mailing list