Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

few ques from INEsystems simulator

 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which tx attribute would you use to ensure the EJB Container invoked a bean with a valid tx context??

Correct answer given :- Required.


What's wrong with RequiredNew,mandatory ???
It says, RequiredNew tx attribute indicates to the container that a new tx must be started for that method ( as
opposed to to using an existing tx context).
But my ques is.. still it invokes the bean in a meaningful tx context , as asked in the ques.
----------------------------------------------------------------------------
Defined two methods
aMethod(){..}
bMethod(){..}

Defined in DD
<transaction-type>RequiresNew</transaction-type> .. for aMethod
<transaction-type>Mandatory</transaction-type> .. for bMethod

Correct answer given... tx attribue for both aMethod() and bMethod() are valid

How...??? to specify a tx attribue, we use <trans-attribue> !!!
----------------------------------------------------------------------------
Which of the following are correct (choose 2)

a. All Session beans have conversational state.
b. session beans involved in tx cannot be passivated.
c. session beans involved in tx can be passivated.
d. Stateful SB can be either retrieved via finder methods or create method in home interface
e. Stateful SB can be either retrieved via finder methods or create method in component interface

Correct answer given : - b,d

How can d be correct.. can we use finder methods for session beans ???
----------------------------------------------------------------------------
[ August 05, 2004: Message edited by: Giju George ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which tx attribute would you use to ensure the EJB Container invoked a bean with a valid tx context??
Correct answer given :- Required.
What's wrong with RequiredNew,mandatory ???
It says, RequiredNew tx attribute indicates to the container that a new tx must be started for that method ( as
opposed to to using an existing tx context).
But my ques is.. still it invokes the bean in a meaningful tx context , as asked in the ques.

The question is badly worded. RequiresNew would also be valid since, as you correctly state, the container would definitely invoke the method within a meaningful transaction context. Mandatory would be wrong, because if there is no valid transaction context, the container will throw an exception.


Defined two methods
aMethod(){..}
bMethod(){..}
Defined in DD
<transaction-type>RequiresNew</transaction-type> .. for aMethod
<transaction-type>Mandatory</transaction-type> .. for bMethod
Correct answer given... tx attribue for both aMethod() and bMethod() are valid
How...??? to specify a tx attribue, we use <trans-attribue> !!!


That's correct, the <trans-attribute> element is used for that purpose!

Which of the following are correct (choose 2)
a. All Session beans have conversational state.
b. session beans involved in tx cannot be passivated.
c. session beans involved in tx can be passivated.
d. Stateful SB can be either retrieved via finder methods or create method in home interface
e. Stateful SB can be either retrieved via finder methods or create method in component interface
Correct answer given : - b,d
How can d be correct.. can we use finder methods for session beans ???

Nope we can't!

I would strongly suggest you file a bug report at INESystems so that their team can get rid of those errors. However, Ian B Anderson has announced that INESystems has been acquired by Whizlabs Ltd recently. So I guess, you should file those bugs to Whizlabs, then
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic