i have just finished reading a tutorial about EJB.
My question is: suppose that from an EJB i call two methods of other two EJB which run two insert query and the second query fails.
What happen in this case ?
Is the entiry process rollbacked or only the first query is executed ?
If the process is rollbacked this is for all the types of EJB, i mean entity bean managed by the container and not.
For short: it depends.
When all the called methods run in the same transaction
and one fails then both fails. Therefore ensure that EJB calling the other EJBs has a transaction and that the other EJBs take this transaction over (no transaction attribute RequireNew or None).