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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
koitoer
Posts: 5
Joined: Wed Apr 03, 2013 5:59 pm
Contact:

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

Post 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.

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

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

Post 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.
If you like our products and services, please help us by posting your review here.

koitoer
Posts: 5
Joined: Wed Apr 03, 2013 5:59 pm
Contact:

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

Post 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

swiss-chris
Posts: 11
Joined: Fri Jan 23, 2015 5:05 am
Contact:

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

Post 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 ?

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

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

Post by admin »

You are right. STATUS_MARKED_ROLLBACK is better. Fixed.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

ikotev
Posts: 17
Joined: Sat Feb 28, 2015 2:26 am
Contact:

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

Post 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.

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

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

Post 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.
If you like our products and services, please help us by posting your review here.

ikotev
Posts: 17
Joined: Sat Feb 28, 2015 2:26 am
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests