• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoSuchEJBException vs NoSuchObjectException

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSR 318, it says two things:
1. "If a stateful session bean has been removed, attempted invocation on the no-interface view reference mus result in a javax.ejb.NoSuchEJBException.
2. "Attempted remote invocation on a stateful session object that does not exist result in a java.rmi.NoSuchObjectException."

If the stateful session bean is removed/does not exist, two different exceptions can be thrown when the method of the bean is attempted to be invoked.

Are these two statements contradicting with each other?

 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2791
181
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't get confused, the EJB 3.1 specification mentions EJB 2.x behaviour for backwards compatibility.

The javax.ejb.NoSuchEJBException is the exception for EJB 3.1 (and the only one you should learn).
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!