aspose file tools*
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 JavaScript Promises Essentials this week in the JavaScript 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalStateException