• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is IllegalStateException a RuntimeException  RSS feed

 
Carlo Smits
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Head First EJB book it is said that all system exceptions, except RemoteException, are RuntimeException. However, if I look up IllegalStateException in the J2EE API, it is a subclass of javax.jms.JMSException, which is a subclass of java.lang.Exception. Does this mean that the IllegalStateException in the J2EE API is a different one?
Thanks,
Carlo
 
Seema Manivannan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Carlo
java.lang.IllegalStateException is thrown by the container to the bean if the bean calls a method on its context and its not allowed. It is a subclass of RuntimeException.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html
Hope this helps.
Thanks
Seema
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!