Hello, Today I was investigating some old code that is run in a jee-application. This is run in a container managed jee-server (weblogic). I stumbled over this code (a bit simplified):
public class AException extends Exception { }
@Stateless @TransactionAttribute(REQUIRED) @TransactionTimeoutSeconds(1000) public class JobEJB implements Job{
public void update() throws AException {
boolean ok = true; try { //do some update in a databse for(int i = 0; i < 100; i++)
As I remember the rules, then system exceptions (RuntimeException and its subclasses including EJBException) cause rollback but application exception like the above AExeption does not cause rollback.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.