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

Moderator: admin

Post Reply
costin1989
Posts: 15
Joined: Tue Apr 21, 2015 1:36 am
Contact:

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

Post by costin1989 » Fri Jan 15, 2016 2:25 am

Hi, could you explain a little bit more this answer:
AnotherBean must be a CMT bean.
Thank you!

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

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

Post by admin » Fri Jan 15, 2016 9:15 am

Not sure if you saw the explanation given with this option, so I am quoting it here:
As per Section 13.6.1 - When a client invokes a business method via one of the enterprise bean’s client views, the container suspends any transaction that may be associated with the client request.

In this case, since the question specifies that anotherBean.anotherMethod() executes in the same transaction that is started by myMethod(), anotherBean has to be a CMT bean, otherwise, the transaction started in myMethod() would be suspended.
Please let me know if you need more clarification.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Gerardo
Posts: 16
Joined: Tue Nov 08, 2016 9:39 pm
Contact:

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

Post by Gerardo » Tue Dec 27, 2016 10:22 pm

Hi Paul,

Does it mean the following?

MySessionBean.myMethod (Tx1 - BMT) ---> AnotherBean.anotherMethod (Tx1 - CMT)

So "AnotherBean.anotherMethod" because of being CMT cannot set the transaction for rollback using UserTransaction.setRollbackOnly() right?

Thanks in advanve

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

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

Post by admin » Wed Dec 28, 2016 8:03 am

That is correct.
If you like our products and services, please help us by posting your review here.

Gerardo
Posts: 16
Joined: Tue Nov 08, 2016 9:39 pm
Contact:

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

Post by Gerardo » Wed Dec 28, 2016 8:06 am

Thanks Paul :)

adriano.jesus
Posts: 4
Joined: Fri Dec 04, 2015 2:26 pm
Contact:

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

Post by adriano.jesus » Sun Jun 25, 2017 8:51 am

About the explanation of the option 5:

"As per Section 13.6.1 - When a client invokes a business method via one of the enterprise bean’s client views, the container suspends any transaction that may be associated with the client request. "

As a suggestion for completeness purposes, I would put as is in EJB 3.1 spec Section 13.6.1, one sentence before this one:
The container must manage client invocations to an enterprise bean instance with bean-managed trans-
action demarcation as follows.
In this way, the explanation will be clearly stated that it is describing about BMT and not CMT.

Just a suggestion.
Best regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests