• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

few ques from INEsystems simulator

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic