Imagine the following two ejb3.0 stateless session beans, each implements a local interface and they are deployed to 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 invoked, does each call to methodB cause a new transaction to begin and commit? Or, since these a both local beans, is there one transaction that begins when methodA is called and is re-used by methodB?
Cheers!