Page 1 of 1

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

Posted: Fri Mar 14, 2014 2:25 am
by koitoer
Hi All.

I think I need some input here to understand why the answer number 5 is correct, the comment on the answer said.
Since the question specifies that anotherBean.anotherMethod() executes in the same transaction that is started by myMethod(), anotherBean must be a CMT bean because if it were a BMT bean, the transaction started by myMethod() would have been suspended.
As MySessionBean is using UserTransaction I assume this is BMT in the bean, when it calls anotherMethod if not clear why if anotherBean is a BMT bean the transaction would have been suspended . I'm not sure how anotherMethod can do that and why if anotherBean were BMT this does not happens.

Also if the TX is suspended obviously it can not be marked for rollback.

I need a little more clarification on this answer or if anyone can point me to the EJB specs part that said that will be great.

Any help will be truly appreciated.

Thanks.

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

Posted: Fri Mar 14, 2014 2:40 am
by admin
As per Section 13.6.1 of EJB 3.1 Specification:
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.

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

Posted: Sat Mar 15, 2014 2:13 am
by koitoer
Thanks a lot for pointing me to the right direction you are right EJB specs said.

Part of the responsibility of the container when bean using BMT is suspend the transaction associated with the client request, as the question tell that method is executed in the same transaction started in the client, it can not be a BMT it must to be CMT bean as the answer number 5 suggest.

Thanks a lot

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

Posted: Mon Feb 09, 2015 5:05 pm
by swiss-chris
Hi

The question asks
what can be done so that LINE 1 is executed only if anotherMethod has NOT set the transaction for a rollback?
https://docs.oracle.com/javaee/6/api/ja ... tatus.html contains, among other, the constants
  • - STATUS_MARKED_ROLLBACK
  • - STATUS_ROLLING_BACK
  • - STATUS_ROLLEDBACK
Wouldn't STATUS_MARKED_ROLLBACK come closer to meaning "set the transaction for a rollback" than STATUS_ROLLEDBACK, which is what you offer as correct answer ?

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

Posted: Fri Feb 13, 2015 10:07 pm
by admin
You are right. STATUS_MARKED_ROLLBACK is better. Fixed.
thank you for your feedback!

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

Posted: Wed Mar 11, 2015 4:56 am
by ikotev
Hi Paul,

Does last point and fix for STATUS_MARKED_ROLLBACK is released ? I am not seeing it. Maybe I have to update my question bank somehow. Can you please confirm if fix is released or not.

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

Posted: Wed Mar 11, 2015 9:25 am
by admin
I see that it has indeed been fixed. But there was a bug in the version number check routine in the server (which is used for version check) because of which some users were not getting the recent version. It has now been fixed. So if you use Tools->Check for updates option, it should update your question and you should see the update. Could you please try it and let me know if you see the update?

thank you,
Paul.

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

Posted: Wed Mar 11, 2015 10:27 am
by ikotev
Hi Paul,

Thank you for fixing that. I was able to download version 1/39 of question bank (I was on 1/36) and I can confirm that mentioned problem above is fixed.