• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

mock question  RSS feed

Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following methods will cause an IllegalStateException when used from within the message-driven bean onMessage() method? [Check all correct answers]


Correct answers given are 1, 4 and 5.

But if you see API for EJBContext interface, this exception is NOT specified in throws clause for isCallerInRole() and getCallerPrincipal() methods.
Comments please.

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.ejb.IlleglStateException is a unchecked exception. (So you dont have to declare it in a throws clause explicitly). This exception is thrown when you call a method of the EJBContext interface where you dont have access to the method you called. Eg. Calling getRollBackOnly() from a BMT MDB.

If you need further clarification and u r in reach of HFEJB read the exceptions chapter which will make it clear to u.

Best of Luck

Lahiru Abeydeera
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!