Page 1 of 1

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Mon Jan 21, 2013 3:36 pm
by user
An uncaught exception may be an application exception as well
Is this because it can be an unchecked exception with @ApplicationException?

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Mon Jan 21, 2013 4:27 pm
by admin
Yes, that is correct.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Mon Jul 08, 2013 4:32 pm
by gurpreet_asrgndu
the correct answer is given as
A message bean method begins a transaction but it (or any of its interceptor methods) does not commit the transaction before exiting from the method.

shouldn't here the transaction be specified as BMT, since if the transaction is CMT then the words " does not cmmit the transaction before exiting from the method " are meaningless because in CMT the transaction is committed once the method which began the transaction completes.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Tue Mar 25, 2014 7:04 am
by andreiribas
I agree with gurpreet_asrgndu.

The last and supposedly correct answer is not clear if the MDB uses CMT or BMT.

If it uses CMT, then it won't need to explicitly commit the transaction because it's managed by the container.

I think this answer needs an update.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Tue Mar 25, 2014 10:52 am
by admin
As gurpreet_asrgndu says, it would be meaningless in case of a CMT. So if the statement says the bean does not commit the transaction before exiting from the method, then it has to be a BMT. It need not be said explicitly.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Mon Jun 15, 2015 4:44 pm
by himaiMinh
For option 1 : "A BMT stateful session bean method ..... without either committing.... the transaction".

If this bean never commits / rolls back the transaction, the container will rollback the transaction, log this as an application error to the system administrator, throw EJBException to the client.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Sat Nov 28, 2020 2:31 pm
by johnlong
Statement :
A message bean method begins a transaction but it (or any of its interceptor methods) does not commit the transaction before exiting from the method.

What if MDB is using BMT and rolls back transaction explicitly? In this case it is not container that rolled transaction back.

Re: About Question enthuware.oce-ejbd.v6.2.436 :

Posted: Sat Nov 28, 2020 11:46 pm
by admin
If a transaction is already rolled back explicitly then there is no question of rolling back, right? The statement in the question is about when the contain must roll it back. Obviously, the transaction has to be active for a container to roll it back.