About Question enthuware.oce-ejbd.v6.2.578 :

Moderator: admin

Post Reply
admin
Site Admin
Posts: 10053
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

That is why the option is wrong.
If you like our products and services, please help us by posting your review here.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

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

Post by himaiMinh »

Hi, for option 3
,
Changes made by the bean code at line 23 will be committed, but the message sent at line 24 will not be sent.
Based on the explanation using the term "redeliver",
Should it be clearer to change this phrase into:
.... the message sent at line 24 will not be re-sent
?

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

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

Post by admin »

No, it is fine as it is because it is a wrong option.
If you like our products and services, please help us by posting your review here.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

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

Post by himaiMinh »

Hi, admin,
Maybe I have been misunderstanding the question.
What I am interpreting from the scenario is:
1. the message at line 24 is put in the queue.
2. the MDB receives it.
3. the MDB's onMessage rollback the transaction after it receives the message from line 24.
4. the container won't redeliver the message.

Correct me if my interpretation of the question is wrong.

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

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

Post by admin »

himaiMinh wrote:Hi, admin,
Maybe I have been misunderstanding the question.
What I am interpreting from the scenario is:
1. the message at line 24 is put in the queue.
2. the MDB receives it.
3. the MDB's onMessage rollback the transaction after it receives the message from line 24.
4. the container won't redeliver the message.

Correct me if my interpretation of the question is wrong.
What you said above is correct.
Paul.
If you like our products and services, please help us by posting your review here.

jhonsoda
Posts: 3
Joined: Tue Jul 21, 2015 7:44 pm
Contact:

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

Post by jhonsoda »

Sorry for my English I only Spanish

In the Explanation to te question you say

As per Section 5.4.15, if bean-managed transaction demarcation is used, the message receipt cannot be part of the bean-managed transaction, and, in this case, the receipt is acknowledged by the container. If a MDB does not throw any exception while processing the message (Note: It can only throw RuntimeExceptions such as EJBException from onMessage()), ....

But in point 5.4.18 of the specification says

....
Message-driven beans should not, in general, throw RuntimeExceptions.

....
The message listener methods of some messaging types may throw application exceptions. An applica-
tion exception is propagated by the container to the resource adapter.

who is right

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

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

Post by admin »

Both are correct. It should not. But it can (it is possible to throw it). You can also annotate a runtime exception with @ApplicationException.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests