Is this because it can be an unchecked exception with @ApplicationException?An uncaught exception may be an application exception as well
About Question enthuware.oce-ejbd.v6.2.436 :
Moderator: admin
Re: About Question enthuware.oce-ejbd.v6.2.436 :
-
- Site Admin
- Posts: 9791
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
Yes, that is correct.
If you like our products and services, please help us by posting your review here.
-
- Posts: 55
- Joined: Thu Jan 03, 2013 7:51 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
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.
-
- Posts: 5
- Joined: Wed Jul 18, 2012 9:02 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
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.
-
- Site Admin
- Posts: 9791
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
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.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
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.
-
- Site Admin
- Posts: 9791
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.436 :
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.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 1 guest