0 votes
in Technology by (326k points)

How EJB Container handles exceptions?

1 Answer

0 votes
by (326k points)
When Application Exception occurs, ejb container intercepts the exception but returns the same to the client as it is. It does not roll back the transaction unless it is specified in code by EJBContext.setRollBackOnly() method. EJB Container does not wrap the exception in case of Application Exception.

When System Exception occurs, ejb container intercepts the exception, rollbacks the transaction and start the clean up tasks. It wraps the exception into RemoteException and throws it to the client.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Nov 7, 2020 in Technology by JackTerrance (326k points)
...