Will client get javax.ejb.EJBTransactionRolledbackException in this case?An application exception with rollback=true will also produce the same result.
About Question enthuware.oce-jpad.v6.2.403 :
Moderators: Site Manager, fjwalraven
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
Yes, that is what the problem statement says as well.
If you like our products and services, please help us by posting your review here.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
Can you advise where it is stated in JBL specifications?
I can see that if AppException is thrown, client will receive get the same AppExcetpion, not javax.ejb.EJBTransactionRolledbackException
I can see that if AppException is thrown, client will receive get the same AppExcetpion, not javax.ejb.EJBTransactionRolledbackException
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
This is specified in Section 13. of EJB 3.1 specification (you need to refer to this because transactions are covered in EJB 3.1). I am not quoting the whole section here but read it and look for the following:
...
If the instance executed in the client’s transaction, the container should throw the javax.ejb.EJBTransactionRolledbackException.
...
If you like our products and services, please help us by posting your review here.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
Do you refer to 14.3.7? If yes, it is only applicable in case If the business interface is a remote business interface that extends java.rmi.Remote, the javax.transaction.TransactionRolledbackException is thrown to the client instead.
I did not find this excerpt in Section 13.
I did not find this excerpt in Section 13.
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
Yes, it is 14.3.7. Not sure why I wrote 13. Sorry about that.
So the same result can be produced with an application exception marked with rollback as true. Therefore, this option is not necessarily correct. I agree that the explanation should say, "An application exception with rollback=true may also produce the same result".
-Paul.
So the same result can be produced with an application exception marked with rollback as true. Therefore, this option is not necessarily correct. I agree that the explanation should say, "An application exception with rollback=true may also produce the same result".
-Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.403 :
14.3.7 applies only to the container’s handling of exceptions thrown from the other container-invoked callbacks on the enterprise bean, not to all cases.
Another issue about "An application exception with rollback=true will also produce the same result." is that the same result in terms of transaction rollback - yes, but it won't be same javax.ejb.EJBTransactionRolledbackException, but ApplicationException what client gets. So we can't say that it would be same result. And we can say that application encountered system exception, unless there is a case of exception thrown from the container-invoked callback on the enterprise bean, which is not case here. We are not told that there was a such call.
Another issue about "An application exception with rollback=true will also produce the same result." is that the same result in terms of transaction rollback - yes, but it won't be same javax.ejb.EJBTransactionRolledbackException, but ApplicationException what client gets. So we can't say that it would be same result. And we can say that application encountered system exception, unless there is a case of exception thrown from the container-invoked callback on the enterprise bean, which is not case here. We are not told that there was a such call.
Who is online
Users browsing this forum: No registered users and 56 guests