Forums Register Login

ques from INESystems

+Pie Number of slices to send: Send
1. What would happend if an Entity bean has been removed from the database and ejbLoad() is called on a bean instance.

Correct ans given: - javax.ejb.NoSuchEntityException.

I answered javax.ejb.NoSuchObjectException.

Which one is right ???. If the entity is removed, then we get NoSuchEntityException and if the bean instance is removed we get NoSuchObjectException.
Now what does the ques refers to .... !!!

--------------------------------------------------------------------------
Which mechanism can be used to learn if an application exception has resulted in a tx being rolled back ???

Correct ans given :- The bean provider can specify which exceptions will mark a tx for rollback before the exception is throw ..

HOW .....
[ August 06, 2004: Message edited by: Giju George ]
+Pie Number of slices to send: Send
There is no javax.ejb.NoSuchObjectException
NoSuchObjectException is defined in the java.rmi package
+Pie Number of slices to send: Send
 

Originally posted by Giju George:

Which mechanism can be used to learn if an application exception has resulted in a tx being rolled back ???

Correct ans given :- The bean provider can specify which exceptions will mark a tx for rollback before the exception is throw ..
HOW .....



By invoking setRollbackOnly().

In case of a checked exception, and if the bean provider knows that such exception will cause the transaction to end badly, it's the bean provider's responsibility to invoke setRollbackOnly before rethrowing the exception. (HF p.542)
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 613 times.
Similar Threads
j2ee certificate ques
doubts in mock exam ques
few ques from INEsystems simulator
some more HF final mock ques
doubts in mock exam ques
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:21:40.