Hello,
My end goal is to have multiple db transactions within a single action method
(similar to: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107449)
I am using pojo with seam annotations, and I cant seem to get anything to work, and am getting very confused.
for instance, I want to create have a method that tests rollback:
@Rollback
public void testRollback() {
EmailAddr email = new EmailAddr();
email.setEmail("test@test.com");
this.entityManager.persist(email);
}
private void insertEmail(EmailAddr addr) {
//start transaction
this.entityManager.persist(email);
//end transaction
}
public void insertEmails() {
for (EmailAddr addr : emails) {
insertEmail(addr);
}
}