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

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
ETS User

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

Post by ETS User »

I think first and 3rd options are same.

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

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

Post by admin »

Option 1 is not correct because it says that the cause of the IllegalStateException is that bean uses BMT and a transaction is not active. But the truth is that it is just one of the two possibilities. The other possibility, as explained in the explanation, is that the exception could have been thrown because the bean uses CMT. So you cannot be sure that the bean uses BMT and the transaction is not active.

Option 3 is different. It is saying that if the bean uses BMT, then then exception is because ut.begin() is not called (i.e. transaction is not active). Notice the difference between 1 and 3. Option 3 does not say that the bean uses BMT, it says "if" the bean uses BMT.

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

cosminvacaroiu

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

Post by cosminvacaroiu »

This is a play of words. Not a transactions question.

jakobheid
Posts: 2
Joined: Wed Jul 16, 2014 10:59 am
Contact:

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

Post by jakobheid »

I think the question is formulated very badly.

As far as I understand this now, Option 1 means that you can get an IllegalStateException only when the bean uses BMT.
Which is not true. It could be using CMT as well and getting an IllegalStateException. That's why Option 2 is correct.
Then Option 3 totally makes sense.

But I was very confused at first because of the wording of the question.
Most people read Option 1 with an "If" at the beginning.

What the question is trying to say, is that you will get a IllegalStateException
1. when it is a CMT Bean (period)
2. when it is a BMT Bean and the transaction is not active.

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

Post by ramy6_1 »

Hello ,

I also still believe that this question is formed badly.

Option one must be correct here since as you explained setRollbackOnly() and rollback() should be called only if a transaction is active.

So how you mentioned at option one "Therefore, the exception could be because the bean uses CMT and not because the transaction is not active." !!

Please explain

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

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

Post by admin »

Please read my previous post above.
If you like our products and services, please help us by posting your review here.

stiekemaj
Posts: 8
Joined: Sun Jan 25, 2015 6:08 am
Contact:

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

Post by stiekemaj »

I also believe this question is formed badly. I totally agree with jakobheid who said that most people read option 1 with an "if", which I also did. I think this answer should be clearer, because now it is a question about reading comprehension instead of CMT/BMT.

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

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

Post by admin »

OK, updated option 1 to make it more clear.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests