posted 21 years ago
MDB can throws System exception only.
MDB can not throws application exception and can not throws exception to client because MDB don't have any client.
MDB run in CMT
CASE 1 : Bean method runs in the context of a transaction that the Container started immediately before dispatching the method. This case happens with
Required attribute.
If
This method is throws System exception
Then
In Container
Log the exception or error.
Rollback the container-started transaction.
Discard instance.
Case 2 : Bean method runs with an unspecified transaction context.
This case happens with the NotSupported.
IF
This method is throws System Exception.
Then
In container
Log the exception or error.
Discard instance.
MDB run in BMT
Bean is message-driven bean.
If this method is throws System exception
Then
Log the exception or error.
Mark for rollback a transaction that has been started, but not yet completed, by the instance.
Discard instance.
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand