For a BMT MDB, what will happen if the onMessage() method just returns before the transaction is committed? Like this:
void onMessage() {
UserTransaction ut = ctx.getUsertransaction();
ut.begin();
.
.
return;
ut.commit();
}
Will an exception be thrown?
First all I belive the code should not compile. Something like "unreachable code error" will be ouput by compiler. If it compiles and run, then the transaction will not commit and finally there could be transaction time out exceptions originated from whatever the transaction manager is being used by the
EJB server.
Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA