About Question enthuware.oce-ejbd.v6.2.472 :
Moderator: admin
-
- Posts: 55
- Joined: Thu Jan 03, 2013 7:51 am
- Contact:
About Question enthuware.oce-ejbd.v6.2.472 :
the explanation should be expanded since it may be possible that clients transaction context is propagated to message driven bean. as written in the specs this may be possible for some messaging listener interface and corresponding messaging provider. using "never' is a bit too strong a word
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
Could you please mention the section where the specification talks about that because I couldn't find it?
thank you,
Paul
thank you,
Paul
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.472 :
well my bad paul, i mistook transaction context for security context which can propagate from caller to MDB. here is the relevant section from the specsadmin wrote:Could you please mention the section where the specification talks about that because I couldn't find it?
thank you,
Paul
5.4.13 Security Context of Message-Driven Bean Methods
-
- Posts: 3
- Joined: Sun Dec 29, 2013 1:44 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
Hi,
I'm just wondering about the difference of RequiresNew and Required within this topic...
Why I cannot use RequiresNew?
This explanation confute neither my feeling:
"Remember that Message Driven beans are not directly called by any user or client. So there can never be an existing transaction when the bean's method is called."
1) So if no tx from client side?
- required: creates a new one
- requiresNew: creates a new one
2) if it has a tx:
- required: use it
- requiresNew: creates a new one
But in case of MDBs, 2) can never happen, so if I consider only 1),...same approach...but why RequiresNew not included in the possible answers?
Thanks,
gonzo
I'm just wondering about the difference of RequiresNew and Required within this topic...
Why I cannot use RequiresNew?
This explanation confute neither my feeling:
"Remember that Message Driven beans are not directly called by any user or client. So there can never be an existing transaction when the bean's method is called."
1) So if no tx from client side?
- required: creates a new one
- requiresNew: creates a new one
2) if it has a tx:
- required: use it
- requiresNew: creates a new one
But in case of MDBs, 2) can never happen, so if I consider only 1),...same approach...but why RequiresNew not included in the possible answers?
Thanks,
gonzo
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
As per Section 13.3.7, page 359 of the EJB 3.1 specification:
Paul.
HTH,For a message-driven bean’s message listener methods (or interface), only the REQUIRED and NOT_SUPPORTED TransactionAttribute values may be used.
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Sun Dec 29, 2013 1:44 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
Hi Paul,
yes, based on the spec, correct answer.
But my original problem was to find the reason why RequiresNew cannot be used here?
Based on my explanation with point 1) and 2) I still cannot see the answer.
(I want to understand why the spec uses Required and RequiresNew does not)
Thank you,
gonzo
yes, based on the spec, correct answer.
But my original problem was to find the reason why RequiresNew cannot be used here?
Based on my explanation with point 1) and 2) I still cannot see the answer.
(I want to understand why the spec uses Required and RequiresNew does not)
Thank you,
gonzo
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
One can only guess why the expert group for the specification did not allow RequriesNew. The most logical reason is already given in the explanation i.e. RequiresNew doesn't make sense in case of MDB because there is no existing transaction.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Sun Dec 29, 2013 1:44 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
yes, and from this point of view Required and RequiresNew are the same, that's why I'm askingadmin wrote:"RequiresNew doesn't make sense in case of MDB because there is no existing transaction"
In my explanation: 2) is ignored, and on the remaining 1) level, the operation mode of 2 transaction types are the same
Sorry for my incomprehension!
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
Hello ,
I also need to understand why RequiresNew is not provided by spec in this case ?
RequiresNew will create a new transaction anyway so it has the same effect of using Required.
We know Spec prevents this , but we need to know why.
Please explain.
I also need to understand why RequiresNew is not provided by spec in this case ?
RequiresNew will create a new transaction anyway so it has the same effect of using Required.
We know Spec prevents this , but we need to know why.
Please explain.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.472 :
No one can really answer this for sure except the spec writers
You may send them an email and ask.
Paul.
You may send them an email and ask.
Paul.
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 74 guests