When should I use `REQUIRED` vs` NOT_SUPPORTED` as the @TransactionAttribute value for the MDB?

I know about container managed transactions (CMT). I also know about the various possible values ​​of an enumerated type TransactionAttributeType. Since the client never calls the MDB directly, attribute types other than REQUIREDand NOT_SUPPORTEDdo not make sense for the MDB, since there is no transaction initiated by the client. So when should I annotate the onMessage()MDB method with REQUIREDvs NOT_SUPPORTED? What will be the default behavior in either of the two options?

+2
source share
2 answers

?

MDB Container - NOT_SUPPORTED.

, onMessage() MDB vs NOT_SUPPORTED?

NOT_SUPPORTED - onMessage() - /, , ; , .

, REQUIRED, try/catch onMessage() setRollbackOnly() catch(), - . XA, onMessage() ; , JMS , , XA- .

MDB NOT_SUPPORTED

MDB REQUIRED NOT_SUPPORTED; , .

onMessage(). onMessage() , .

+5

. , , .

stackoverflow:

ATACIBTE TRANSACTION MDBS?

Weblogic.

+1

Source: https://habr.com/ru/post/1613181/


All Articles