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

Moderator: admin

Post Reply
ETS User

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

Post by ETS User »

Am I correct in saying that option 2 and 5 are the same?

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

Post by ramy6_1 »

Hello ,

Can you please explain first point in your explanation ?
I understand that methodA's transaction attribute is NotSupported and that means caller transaction will be suspended and methodA will be executed without any transaction context.

But why this make options 1, 2, and 5 to be invalid ?

Please explain

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

Post by ramy6_1 »

I appreciate if you differentiate between TxCL and TxD.

What is exactly the difference between them ?

Thanks in advance

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

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

Post by admin »

They are just different names for different transactions. TxCL is the transaction that is coming from the client. TxD is the transaction that is started by methodD.
If you like our products and services, please help us by posting your review here.

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

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

Post by admin »

ramy6_1 wrote:Hello ,

Can you please explain first point in your explanation ?
I understand that methodA's transaction attribute is NotSupported and that means caller transaction will be suspended and methodA will be executed without any transaction context.

But why this make options 1, 2, and 5 to be invalid ?

Please explain
Because if you look at images 1, 2, 5, you will see that they show that methodA has a transaction context. If you read the explanation, it explains why methodA will be executed without any transaction. Therefore, 1, 2, and 5 cannot be valid.
If you like our products and services, please help us by posting your review here.

javabean68
Posts: 31
Joined: Wed Mar 16, 2016 8:38 am
Contact:

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

Post by javabean68 »

Hallo,

A question of mine: if methodB in case 1 were NotSupported could it be that txA were suspended but then again activated in methodD?

Thank you very much!
Fabio

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

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

Post by admin »

No, txA will resume only when the control comes back to methodA. As per section 13.6.2.1 of EJB 3.1 specification :
If a client calls with a transaction context, the container suspends the association of the transaction con-
text with the current thread before invoking the enterprise bean’s business method. The container
resumes the suspended association when the business method has completed. The suspended transac-
tion context of the client is not passed to the resource managers or other enterprise bean objects that are
invoked from the business method.
If the business method invokes other enterprise beans, the container passes no transaction context with
the invocation.
If the transaction context does not get passed to calls further down the chain, that transaction cannot be resumed by the beans invoked later.
If you like our products and services, please help us by posting your review here.

javabean68
Posts: 31
Joined: Wed Mar 16, 2016 8:38 am
Contact:

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

Post by javabean68 »

Wow! Your answers are really super! I am been learning a lot thank to you. :joy:

Ciao
Fabio

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests