Imagine the following two sessions without saving the state of ejb3.0 beans, each of them implements a local interface and deploys into the same container:
public class EjbA {
@EJB
private ejbB;
public void methodA() {
for (int i=0; i<100; i++) {
ejbB.methodB();
}
}
}
public class EjbB {
public void methodB() {
...
}
}
When methodA is called, every call to method B triggers the start and commit of a new transaction? Or, since these are local beans, is there one transaction that starts when method A is called and reused by method B?
Hooray!
source
share