About Question enthuware.oce-jpad.v6.2.403 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by johnlong »

An application exception with rollback=true will also produce the same result.
Will client get javax.ejb.EJBTransactionRolledbackException in this case?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by admin »

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.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by johnlong »

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

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by admin »

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.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by johnlong »

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.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by admin »

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.
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.403 :

Post by johnlong »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests