About Question enthuware.oce-ejbd.v6.2.508 :
Moderator: admin
-
- Posts: 9
- Joined: Mon Oct 08, 2012 10:09 am
- Contact:
About Question enthuware.oce-ejbd.v6.2.508 :
For the answer option 3, Isn't that if the MDB throws a runtime exception use BMT, the container should not acknowledge the message, so the message would also be redilieved?
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
In case of BMT, the message delivery is not part of the transaction. So even in case of an exception, the message is not redelivered. This is as per section 5.4.12.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
I think there are two correct answers, the answer "He should use container managed transactions with transaction attribute of REQUIRED." and:
"Nothing. This is guaranteed by the container."
because the default TransactionManagement type is Container Managed and the default TransactionAttribute is REQUIRED.
Frits
"Nothing. This is guaranteed by the container."
because the default TransactionManagement type is Container Managed and the default TransactionAttribute is REQUIRED.
Regards,Specs:
13.3.4.1 footnote
REQUIRED is the default transaction attribute value for container managed transaction demarcation
13.3.1
Typically enterprise beans will be specified to have container-managed transaction demarcation. This is the default if no transaction management type is specified.
Frits
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
This is a good point. But if you make this option right it may lead to a conclusion that the developer needs to do nothing for the message delivery part even if the bean uses BMT, which is not right.fjwalraven wrote:I think there are two correct answers, the answer "He should use container managed transactions with transaction attribute of REQUIRED." and:
"Nothing. This is guaranteed by the container."
because the default TransactionManagement type is Container Managed and the default TransactionAttribute is REQUIRED.Regards,Specs:
13.3.4.1 footnote
REQUIRED is the default transaction attribute value for container managed transaction demarcation
13.3.1
Typically enterprise beans will be specified to have container-managed transaction demarcation. This is the default if no transaction management type is specified.
Frits
Actually, it is not very intuitive that the transaction type of the bean directly affects the message delivery and so a developer has to consciously decide something (i.e. use CMT with REQUIRED) to achieve the desired behavior. Had it been a given in the question that the bean uses default transaction type, then "do nothing" would make more sense.
So to avoid this ambiguity, I have now changed the option to "This is guaranteed by the container for all types of MDBs.", which is unambiguously wrong.
Hope that makes is better. thanks for the feedback!
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 33
- Joined: Sat Nov 24, 2012 8:52 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
I have same concern in this question which I raised for question
This was started by Jofen as well
depend on whether acknowledgement is recieved or not.
so in case of RuntimeException in BMT when container will not recieve the any acknowledgement , it wil try to redeliver .
Option 1 should be marked as correct answer .
enthuware.oce-ejbd.v6.2.578
This was started by Jofen as well
Though Specifications did not give any clear statement about redelivery in case of BMT MDB but going by the reason that re-delivery willBMT MDB will be redelivered the messages in case of RunTimeException since there is no acknowledgement from the container in this case.
depend on whether acknowledgement is recieved or not.
so in case of RuntimeException in BMT when container will not recieve the any acknowledgement , it wil try to redeliver .
Option 1 should be marked as correct answer .
-
- Posts: 26
- Joined: Fri Jul 06, 2012 1:08 am
- Location: Poland
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
My experience with Weblogic Server is that if system exception is thrown from BMT MDB, then the message is not redelivered. I had to manually reinsert a message after catching exception:/ Any experiences with other app servers?
J
J
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
Is this true, regardless of TransactionAttribute - NOT_SUPPORTED or REQUIRED?As per Section 5.4.18, if a message-driven bean uses bean-managed transaction demarcation and throws a RuntimeException, the container should not acknowledge the message. Therefore the message will be redelivered.
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.508 :
No, not for NOT_SUPPORTED. If the transaction attribute is NOT_SUPPORTED that means there is no transaction in the bean. The container will therefore acknowledge the message irrespective of what the bean does.
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-ejbd.v6.2.508 :
In this case may I advise to add this detail to question/explanation. Otherwise it is not accurate.
Who is online
Users browsing this forum: No registered users and 131 guests