This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes IllegalStateException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "IllegalStateException" Watch "IllegalStateException" New topic
Author

IllegalStateException

sandeep vaid
Greenhorn

Joined: Jul 08, 2004
Posts: 20
public interface EJBContext {
EJBHome getEJBHome();
EJBLocalHome getEJBLocalHome();
Principal getCallerPrincipal();
boolean isCallerInRole(String roleName);
UserTransaction getUserTransaction() throws IllegalStateException;
void setRollbackOnly() throws IllegalStateException;
boolean getRollbackOnly() throws IllegalStateException;
}


Here in
Principal getCallerPrincipal();
boolean isCallerInRole(String roleName);

There is no throws class that cantains IllegalStateException so how come it can thro this type of exception if called on MDB's.


Thanks!!
Sandy
Sandesh Tathare
Ranch Hand

Joined: Jun 22, 2003
Posts: 82
Sandy,

I think you are talking about java.lang.IllegalStateException.

Note that java.lang.IllegalStateException is runtime exception and not a checked one. So one is not required to declare it in throws clause.



Regards,<br />Sandesh<br />(SCJCP, SCWCD, SCBCD - 99%, OCP-1)<br /> <br />Either find a way or create one.
 
 
subject: IllegalStateException
 
Similar Threads
caller principal question from spec
Doubt about isCallerInRole-Question
interesting.
mock question
Mock Question - I'm I missing something?