• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

One more Exception question

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Page 561 HFEJB
1.
The Exception for when the client calls getPrimaryKey() on the componenet interface of a session bean.

Is it java.lang.IllegalStateException ?

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

3.
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.

Thanks,
Gemini

[ March 21, 2005: Message edited by: Gemini Moses ]
[ March 21, 2005: Message edited by: Gemini Moses ]
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there Gemini,
this helps?
1) RemoteException/EJBException
2)when nested Tx is requested.
3)you are right.

Amol.
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic