Page 1 of 1

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

Posted: Sat Sep 29, 2012 2:20 am
by ETS User
Am I correct in saying that option 2 and 5 are the same?

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

Posted: Mon Jul 21, 2014 2:11 am
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

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

Posted: Mon Jul 21, 2014 2:17 am
by ramy6_1
I appreciate if you differentiate between TxCL and TxD.

What is exactly the difference between them ?

Thanks in advance

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

Posted: Tue Jul 22, 2014 1:34 am
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.

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

Posted: Tue Jul 22, 2014 1:37 am
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.

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

Posted: Thu May 04, 2017 7:26 am
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

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

Posted: Thu May 04, 2017 10:46 am
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.

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

Posted: Fri May 05, 2017 4:19 am
by javabean68
Wow! Your answers are really super! I am been learning a lot thank to you. :joy:

Ciao
Fabio