Thank you!AnotherBean must be a CMT bean.
About Question enthuware.oce-ejbd.v6.2.610 :
Moderator: admin
-
- Posts: 15
- Joined: Tue Apr 21, 2015 1:36 am
- Contact:
About Question enthuware.oce-ejbd.v6.2.610 :
Hi, could you explain a little bit more this answer:
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.610 :
Not sure if you saw the explanation given with this option, so I am quoting it here:
HTH,
Paul.
Please let me know if you need more clarification.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.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 16
- Joined: Tue Nov 08, 2016 9:39 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.610 :
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
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
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.610 :
That is correct.
If you like our products and services, please help us by posting your review here.
-
- Posts: 16
- Joined: Tue Nov 08, 2016 9:39 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.610 :
Thanks Paul
-
- Posts: 4
- Joined: Fri Dec 04, 2015 2:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.610 :
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:
Just a suggestion.
Best regards.
"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:
In this way, the explanation will be clearly stated that it is describing about BMT and not CMT.The container must manage client invocations to an enterprise bean instance with bean-managed trans-
action demarcation as follows.
Just a suggestion.
Best regards.
Who is online
Users browsing this forum: No registered users and 113 guests