With EJB3 the application server makes sure that your methods are executed within a transaction. This is not the case with Servlets so you have to start and commit the transaction yourself. Here is the code:
| UserTransaction utx = Transactions.getUserTransaction(); | if(utx.getStatus() != Status.STATUS_ACTIVE) | utx.begin(); | em.joinTransaction(); | utx.commit(); | The if statement is not required however I needed that in my web application due to an exception that I don't recall right now. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965230#3965230 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965230 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
