File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes One more Exception question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "One more Exception question" Watch "One more Exception question" New topic

One more Exception question

Gemini Moses
Ranch Hand

Joined: Jan 04, 2001
Posts: 245
Page 561 HFEJB
The Exception for when the client calls getPrimaryKey() on the componenet interface of a session bean.

Is it java.lang.IllegalStateException ?

Also, on the same page one of the option provided is NotSupportedException. When is this thrown?

On page 556
6. A bean wants the client to get an application exception, but the bean still wants the transaction to commit. What should the bean do?

Are they looking for answer, do not call setRollbackOnly and let the exception propogate to container and in turn client as is?
I can not think of anything that we can do to ensure that transaction commits.


[ March 21, 2005: Message edited by: Gemini Moses ]
[ March 21, 2005: Message edited by: Gemini Moses ]
Deep Chand
Ranch Hand

Joined: Dec 17, 2002
Posts: 133
From MZ Study Notes:

"When an instance attempts to start a transaction using the begin() method of the javax.transaction.UserTransaction interface while the instance has not committed the previous transaction, the Container must throw the javax.transaction.NotSupportedException in the begin() method. "

Hope this helps.
amol deshpande
Ranch Hand

Joined: Sep 05, 2003
Posts: 162
Hi there Gemini,
this helps?
1) RemoteException/EJBException
2)when nested Tx is requested.
3)you are right.

I agree. Here's the link:
subject: One more Exception question
It's not a secret anymore!